From bbea132dcf2d21a664fc6fbab757ad7f5dc3c17c Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 13 Dec 2024 07:50:36 +0000 Subject: [PATCH] CodeGen from PR 31855 in Azure/azure-rest-api-specs Merge c3f61c79e9f535e3a3f10dff5b1c7cb1af7105af into 52a1a37b2d9afd4c20a621dcf0103e8900d76225 --- sdk/advisor/ci.mgmt.yml | 13 + sdk/agrifood/ci.mgmt.yml | 13 + sdk/alertsmanagement/ci.mgmt.yml | 13 + sdk/analysisservices/ci.mgmt.yml | 13 + sdk/apicenter/ci.mgmt.yml | 13 + sdk/apimanagement/ci.mgmt.yml | 13 + sdk/appcomplianceautomation/ci.mgmt.yml | 13 + sdk/appconfiguration/ci.mgmt.yml | 13 + sdk/applicationinsights/ci.mgmt.yml | 13 + sdk/appplatform/ci.mgmt.yml | 13 + sdk/arc-scvmm/ci.mgmt.yml | 13 + sdk/astronomer/ci.mgmt.yml | 13 + sdk/attestation/ci.mgmt.yml | 13 + sdk/authorization/ci.mgmt.yml | 13 + sdk/automanage/ci.mgmt.yml | 13 + sdk/automation/ci.mgmt.yml | 13 + sdk/avs/ci.mgmt.yml | 13 + sdk/azurelargeinstance/ci.mgmt.yml | 13 + sdk/azurestackhci/ci.mgmt.yml | 13 + sdk/batch/ci.mgmt.yml | 13 + sdk/billing/ci.mgmt.yml | 13 + sdk/billingbenefits/ci.mgmt.yml | 13 + sdk/blueprint/ci.mgmt.yml | 13 + sdk/botservice/ci.mgmt.yml | 13 + sdk/cdn/ci.mgmt.yml | 13 + sdk/changeanalysis/ci.mgmt.yml | 13 + sdk/chaos/ci.mgmt.yml | 13 + sdk/cognitiveservices/ci.mgmt.yml | 13 + sdk/communication/ci.mgmt.yml | 13 + sdk/compute/ci.mgmt.yml | 13 + sdk/computefleet/ci.mgmt.yml | 13 + sdk/computeschedule/ci.mgmt.yml | 13 + sdk/confidentialledger/ci.mgmt.yml | 13 + sdk/confluent/ci.mgmt.yml | 13 + sdk/connectedvmwarevsphere/ci.mgmt.yml | 13 + sdk/consumption/ci.mgmt.yml | 13 + sdk/containerapps/ci.mgmt.yml | 13 + sdk/containerinstance/ci.mgmt.yml | 13 + sdk/containerorchestratorruntime/ci.mgmt.yml | 13 + sdk/containerregistry/ci.mgmt.yml | 13 + sdk/containerservice/ci.mgmt.yml | 13 + sdk/cosmosdb/ci.mgmt.yml | 13 + sdk/cosmosdbforpostgresql/ci.mgmt.yml | 13 + sdk/costmanagement/ci.mgmt.yml | 13 + sdk/customer-insights/ci.mgmt.yml | 13 + sdk/databox/ci.mgmt.yml | 13 + sdk/databoxedge/ci.mgmt.yml | 13 + sdk/datadog/ci.mgmt.yml | 13 + sdk/datafactory/ci.mgmt.yml | 13 + sdk/datalake-analytics/ci.mgmt.yml | 13 + sdk/datalake-store/ci.mgmt.yml | 13 + sdk/datamigration/ci.mgmt.yml | 13 + sdk/dataprotection/ci.mgmt.yml | 13 + sdk/datashare/ci.mgmt.yml | 13 + sdk/defendereasm/ci.mgmt.yml | 13 + sdk/desktopvirtualization/ci.mgmt.yml | 13 + sdk/devcenter/ci.mgmt.yml | 13 + sdk/deviceprovisioningservices/ci.mgmt.yml | 13 + sdk/deviceregistry/ci.mgmt.yml | 13 + sdk/deviceupdate/ci.mgmt.yml | 13 + sdk/devopsinfrastructure/ci.mgmt.yml | 13 + sdk/devspaces/ci.mgmt.yml | 13 + sdk/devtestlabs/ci.mgmt.yml | 13 + sdk/digitaltwins/ci.mgmt.yml | 13 + sdk/dns/ci.mgmt.yml | 13 + sdk/dnsresolver/ci.mgmt.yml | 13 + sdk/dynatrace/ci.mgmt.yml | 13 + sdk/edgeorder/ci.mgmt.yml | 13 + sdk/edgezones/ci.mgmt.yml | 13 + sdk/elastic/ci.mgmt.yml | 13 + sdk/elasticsan/ci.mgmt.yml | 13 + sdk/eventgrid/ci.mgmt.yml | 13 + sdk/eventhub/ci.mgmt.yml | 13 + sdk/extendedlocation/ci.mgmt.yml | 13 + sdk/fabric/ci.mgmt.yml | 13 + sdk/fleet/ci.mgmt.yml | 13 + sdk/fluidrelay/ci.mgmt.yml | 13 + sdk/frontdoor/ci.mgmt.yml | 13 + sdk/grafana/ci.mgmt.yml | 13 + sdk/graphservices/ci.mgmt.yml | 13 + sdk/guestconfiguration/ci.mgmt.yml | 13 + sdk/hardwaresecuritymodules/ci.mgmt.yml | 13 + sdk/hdinsight/ci.mgmt.yml | 13 + sdk/hdinsightcontainers/ci.mgmt.yml | 13 + sdk/healthbot/ci.mgmt.yml | 13 + sdk/healthcareapis/ci.mgmt.yml | 13 + sdk/healthdataaiservices/ci.mgmt.yml | 13 + sdk/hybridaks/ci.mgmt.yml | 13 + sdk/hybridcompute/ci.mgmt.yml | 13 + sdk/hybridconnectivity/ci.mgmt.yml | 13 + sdk/hybridkubernetes/ci.mgmt.yml | 13 + sdk/hybridnetwork/ci.mgmt.yml | 13 + sdk/informaticadatamanagement/ci.mgmt.yml | 13 + sdk/iot/ci.mgmt.yml | 13 + sdk/iotcentral/ci.mgmt.yml | 13 + sdk/iothub/ci.mgmt.yml | 13 + sdk/keyvault/ci.mgmt.yml | 13 + sdk/kubernetesconfiguration/ci.mgmt.yml | 13 + sdk/kusto/ci.mgmt.yml | 13 + sdk/labservices/ci.mgmt.yml | 13 + sdk/loadtestservice/ci.mgmt.yml | 13 + sdk/logic/ci.mgmt.yml | 13 + sdk/machinelearningcompute/ci.mgmt.yml | 13 + sdk/machinelearningservices/ci.mgmt.yml | 13 + sdk/maintenance/ci.mgmt.yml | 13 + sdk/managednetwork/ci.mgmt.yml | 13 + sdk/managednetworkfabric/ci.mgmt.yml | 13 + sdk/managedserviceidentity/ci.mgmt.yml | 13 + sdk/managedservices/ci.mgmt.yml | 13 + sdk/managementpartner/ci.mgmt.yml | 13 + sdk/maps/ci.mgmt.yml | 13 + sdk/marketplace/ci.mgmt.yml | 13 + sdk/marketplaceordering/ci.mgmt.yml | 13 + sdk/mediaservices/ci.mgmt.yml | 13 + sdk/migrationdiscoverysap/ci.mgmt.yml | 13 + sdk/mixedreality/ci.mgmt.yml | 13 + sdk/mobilenetwork/ci.mgmt.yml | 13 + sdk/mongocluster/ci.mgmt.yml | 13 + sdk/monitor/ci.mgmt.yml | 13 + sdk/mysql/ci.mgmt.yml | 13 + sdk/neonpostgres/ci.mgmt.yml | 13 + sdk/netapp/ci.mgmt.yml | 13 + sdk/network/ci.mgmt.yml | 13 + sdk/networkanalytics/ci.mgmt.yml | 13 + sdk/networkcloud/ci.mgmt.yml | 13 + sdk/networkfunction/ci.mgmt.yml | 13 + sdk/newrelicobservability/ci.mgmt.yml | 13 + sdk/nginx/ci.mgmt.yml | 13 + sdk/notificationhubs/ci.mgmt.yml | 13 + sdk/openenergyplatform/ci.mgmt.yml | 13 + sdk/operationalinsights/ci.mgmt.yml | 13 + sdk/oracle/ci.mgmt.yml | 13 + sdk/orbital/ci.mgmt.yml | 13 + sdk/paloaltonetworks.ngfw/ci.mgmt.yml | 13 + sdk/peering/ci.mgmt.yml | 13 + ...e.Developer.MicrosoftPlaywrightTesting.sln | 56 ++ .../CHANGELOG.md | 11 + .../Directory.Build.props | 6 + .../README.md | 107 +++ ...eveloper.MicrosoftPlaywrightTesting.csproj | 19 + .../Generated/AccessToken.Serialization.cs | 201 ++++++ .../src/Generated/AccessToken.cs | 97 +++ .../src/Generated/AccessTokenState.cs | 51 ++ .../src/Generated/AccessTokens.cs | 650 ++++++++++++++++++ .../src/Generated/Account.Serialization.cs | 295 ++++++++ .../src/Generated/Account.cs | 109 +++ .../src/Generated/AccountState.cs | 51 ++ .../src/Generated/Accounts.cs | 340 +++++++++ .../src/Generated/AuthManagerClient.cs | 85 +++ .../src/Generated/AuthManagerClientOptions.cs | 37 + ...laywrightTestingClientBuilderExtensions.cs | 38 + ...rMicrosoftPlaywrightTestingModelFactory.cs | 69 ++ .../src/Generated/Docs/AccessTokens.xml | 251 +++++++ .../src/Generated/Docs/Accounts.xml | 117 ++++ .../src/Generated}/EnablementStatus.cs | 2 +- .../src/Generated/Internal/Argument.cs | 129 ++++ .../Internal/ChangeTrackingDictionary.cs | 167 +++++ .../Generated/Internal/ChangeTrackingList.cs | 153 +++++ .../Internal/ModelSerializationExtensions.cs | 398 +++++++++++ .../src/Generated/Internal/Optional.cs | 51 ++ .../Internal/Utf8JsonRequestContent.cs | 55 ++ .../src/Generated/OS.cs | 51 ++ .../src/Generated/SubscriptionState.cs | 60 ++ .../src/Properties/AssemblyInfo.cs | 11 + ...er.MicrosoftPlaywrightTesting.Tests.csproj | 20 + .../Generated/Samples/Samples_AccessTokens.cs | 265 +++++++ .../Generated/Samples/Samples_Accounts.cs | 131 ++++ .../tsp-location.yaml | 4 + ...esourceManager.PlaywrightTesting.net8.0.cs | 334 +++++++-- ...anager.PlaywrightTesting.netstandard2.0.cs | 334 +++++++-- ...mple_PlaywrightTestingAccountCollection.cs | 151 +--- ...PlaywrightTestingAccountQuotaCollection.cs | 161 +++++ ...e_PlaywrightTestingAccountQuotaResource.cs | 50 ++ ...Sample_PlaywrightTestingAccountResource.cs | 55 +- ...Sample_PlaywrightTestingQuotaCollection.cs | 36 +- .../Sample_PlaywrightTestingQuotaResource.cs | 10 +- .../Sample_SubscriptionResourceExtensions.cs | 25 +- .../ArmPlaywrightTestingModelFactory.cs | 131 +++- .../MockablePlaywrightTestingArmClient.cs | 12 + ...ePlaywrightTestingResourceGroupResource.cs | 32 +- ...lePlaywrightTestingSubscriptionResource.cs | 129 +++- .../Extensions/PlaywrightTestingExtensions.cs | 176 +++-- .../AccountQuotaListResult.Serialization.cs | 151 ++++ .../Models/AccountQuotaListResult.cs | 80 +++ .../AccountUpdateProperties.Serialization.cs | 178 +++++ .../Models/AccountUpdateProperties.cs | 77 +++ .../src/Generated/Models/FreeTrialState.cs | 51 -- ...countFreeTrialProperties.Serialization.cs} | 66 +- ...rightTestingAccountFreeTrialProperties.cs} | 30 +- ...wrightTestingAccountPatch.Serialization.cs | 57 +- .../Models/PlaywrightTestingAccountPatch.cs | 18 +- ...tTestingAccountProperties.Serialization.cs | 215 ++++++ .../PlaywrightTestingAccountProperties.cs | 85 +++ ...ingAccountQuotaProperties.Serialization.cs | 148 ++++ ...PlaywrightTestingAccountQuotaProperties.cs | 69 ++ .../PlaywrightTestingEnablementStatus.cs | 51 ++ ...estingFreeTrialProperties.Serialization.cs | 140 ++++ .../PlaywrightTestingFreeTrialProperties.cs | 78 +++ .../Models/PlaywrightTestingFreeTrialState.cs | 57 ++ ...ngNameAvailabilityContent.Serialization.cs | 140 ++++ ...laywrightTestingNameAvailabilityContent.cs | 69 ++ ...ingNameAvailabilityResult.Serialization.cs | 159 +++++ ...PlaywrightTestingNameAvailabilityResult.cs | 73 ++ .../PlaywrightTestingNameUnavailableReason.cs | 51 ++ .../Models/PlaywrightTestingOfferingType.cs | 57 ++ .../PlaywrightTestingProvisioningState.cs | 7 +- .../Models/PlaywrightTestingQuotaName.cs | 5 +- ...ghtTestingQuotaProperties.Serialization.cs | 163 +++++ .../PlaywrightTestingQuotaProperties.cs | 73 ++ .../PlaywrightTestingAccountCollection.cs | 156 ++--- ...ywrightTestingAccountData.Serialization.cs | 107 +-- .../Generated/PlaywrightTestingAccountData.cs | 28 +- ...PlaywrightTestingAccountQuotaCollection.cs | 372 ++++++++++ ...htTestingAccountQuotaData.Serialization.cs | 155 +++++ .../PlaywrightTestingAccountQuotaData.cs | 75 ++ ...stingAccountQuotaResource.Serialization.cs | 26 + .../PlaywrightTestingAccountQuotaResource.cs | 172 +++++ .../PlaywrightTestingAccountResource.cs | 143 ++-- .../PlaywrightTestingQuotaCollection.cs | 98 +-- ...laywrightTestingQuotaData.Serialization.cs | 59 +- .../Generated/PlaywrightTestingQuotaData.cs | 18 +- .../PlaywrightTestingQuotaResource.cs | 26 +- .../AccountQuotasRestOperations.cs | 319 +++++++++ .../RestOperations/AccountsRestOperations.cs | 498 ++++++++------ .../RestOperations/QuotasRestOperations.cs | 128 ++-- .../src/autorest.md | 63 -- .../tsp-location.yaml | 4 + sdk/playwrighttesting/ci.mgmt.yml | 13 + sdk/policyinsights/ci.mgmt.yml | 13 + sdk/postgresql/ci.mgmt.yml | 13 + sdk/powerbidedicated/ci.mgmt.yml | 13 + sdk/privatedns/ci.mgmt.yml | 13 + sdk/providerhub/ci.mgmt.yml | 13 + sdk/purview/ci.mgmt.yml | 13 + sdk/quantum/ci.mgmt.yml | 13 + sdk/qumulo/ci.mgmt.yml | 13 + sdk/quota/ci.mgmt.yml | 13 + sdk/recoveryservices-backup/ci.mgmt.yml | 13 + .../ci.mgmt.yml | 13 + sdk/recoveryservices-siterecovery/ci.mgmt.yml | 13 + sdk/recoveryservices/ci.mgmt.yml | 13 + sdk/redis/ci.mgmt.yml | 13 + sdk/redisenterprise/ci.mgmt.yml | 13 + sdk/relay/ci.mgmt.yml | 13 + sdk/reservations/ci.mgmt.yml | 13 + sdk/resourceconnector/ci.mgmt.yml | 13 + sdk/resourcegraph/ci.mgmt.yml | 13 + sdk/resourcehealth/ci.mgmt.yml | 13 + sdk/resourcemover/ci.mgmt.yml | 13 + sdk/resources/ci.mgmt.yml | 13 + sdk/search/ci.mgmt.yml | 13 + sdk/securitycenter/ci.mgmt.yml | 13 + sdk/securitydevops/ci.mgmt.yml | 13 + sdk/securityinsights/ci.mgmt.yml | 13 + sdk/selfhelp/ci.mgmt.yml | 13 + sdk/servicebus/ci.mgmt.yml | 13 + sdk/servicefabric/ci.mgmt.yml | 13 + sdk/servicefabricmanagedclusters/ci.mgmt.yml | 13 + sdk/servicelinker/ci.mgmt.yml | 13 + sdk/servicenetworking/ci.mgmt.yml | 13 + sdk/signalr/ci.mgmt.yml | 13 + sdk/sphere/ci.mgmt.yml | 13 + sdk/springappdiscovery/ci.mgmt.yml | 13 + sdk/sqlmanagement/ci.mgmt.yml | 13 + sdk/sqlvirtualmachine/ci.mgmt.yml | 13 + sdk/standbypool/ci.mgmt.yml | 13 + sdk/storage/ci.mgmt.yml | 13 + sdk/storageactions/ci.mgmt.yml | 13 + sdk/storagecache/ci.mgmt.yml | 13 + sdk/storagemover/ci.mgmt.yml | 13 + sdk/storagepool/ci.mgmt.yml | 13 + sdk/storagesync/ci.mgmt.yml | 13 + sdk/streamanalytics/ci.mgmt.yml | 13 + sdk/subscription/ci.mgmt.yml | 13 + sdk/support/ci.mgmt.yml | 13 + sdk/synapse/ci.mgmt.yml | 13 + sdk/terraform/ci.mgmt.yml | 13 + sdk/trafficmanager/ci.mgmt.yml | 13 + sdk/trustedsigning/ci.mgmt.yml | 13 + sdk/voiceservices/ci.mgmt.yml | 13 + sdk/webpubsub/ci.mgmt.yml | 13 + sdk/websites/ci.mgmt.yml | 13 + sdk/workloadmonitor/ci.mgmt.yml | 13 + sdk/workloads/ci.mgmt.yml | 13 + 284 files changed, 11678 insertions(+), 1336 deletions(-) create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/Azure.Developer.MicrosoftPlaywrightTesting.sln create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/CHANGELOG.md create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/Directory.Build.props create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/README.md create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Azure.Developer.MicrosoftPlaywrightTesting.csproj create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessToken.Serialization.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessToken.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessTokenState.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessTokens.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Account.Serialization.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Account.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccountState.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Accounts.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AuthManagerClient.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AuthManagerClientOptions.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/DeveloperMicrosoftPlaywrightTestingClientBuilderExtensions.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/DeveloperMicrosoftPlaywrightTestingModelFactory.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Docs/AccessTokens.xml create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Docs/Accounts.xml rename sdk/playwrighttesting/{Azure.ResourceManager.PlaywrightTesting/src/Generated/Models => Azure.Developer.MicrosoftPlaywrightTesting/src/Generated}/EnablementStatus.cs (97%) create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/Argument.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/ChangeTrackingDictionary.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/ChangeTrackingList.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/ModelSerializationExtensions.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/Optional.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/Utf8JsonRequestContent.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/OS.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/SubscriptionState.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Properties/AssemblyInfo.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Azure.Developer.MicrosoftPlaywrightTesting.Tests.csproj create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Generated/Samples/Samples_AccessTokens.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Generated/Samples/Samples_Accounts.cs create mode 100644 sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tsp-location.yaml create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountQuotaCollection.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountQuotaResource.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountQuotaListResult.Serialization.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountQuotaListResult.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountUpdateProperties.Serialization.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountUpdateProperties.cs delete mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/FreeTrialState.cs rename sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/{FreeTrialProperties.Serialization.cs => PlaywrightTestingAccountFreeTrialProperties.Serialization.cs} (65%) rename sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/{FreeTrialProperties.cs => PlaywrightTestingAccountFreeTrialProperties.cs} (71%) create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountProperties.Serialization.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountProperties.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountQuotaProperties.Serialization.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountQuotaProperties.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingEnablementStatus.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingFreeTrialProperties.Serialization.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingFreeTrialProperties.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingFreeTrialState.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityContent.Serialization.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityContent.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityResult.Serialization.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityResult.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameUnavailableReason.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingOfferingType.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingQuotaProperties.Serialization.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingQuotaProperties.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaCollection.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaData.Serialization.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaData.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaResource.Serialization.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaResource.cs create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/RestOperations/AccountQuotasRestOperations.cs delete mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/autorest.md create mode 100644 sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tsp-location.yaml diff --git a/sdk/advisor/ci.mgmt.yml b/sdk/advisor/ci.mgmt.yml index 6b9f8d6952e63..22df99de35f22 100644 --- a/sdk/advisor/ci.mgmt.yml +++ b/sdk/advisor/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/advisor/ci.mgmt.yml - sdk/advisor/Azure.ResourceManager.Advisor/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/advisor/ci.mgmt.yml + - sdk/advisor/Azure.ResourceManager.Advisor/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/agrifood/ci.mgmt.yml b/sdk/agrifood/ci.mgmt.yml index ee27d71f94951..03a5f6399ccbb 100644 --- a/sdk/agrifood/ci.mgmt.yml +++ b/sdk/agrifood/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/agrifood/ci.mgmt.yml - sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/agrifood/ci.mgmt.yml + - sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/alertsmanagement/ci.mgmt.yml b/sdk/alertsmanagement/ci.mgmt.yml index f33a90fffe5cd..ad3a8d3d1efd9 100644 --- a/sdk/alertsmanagement/ci.mgmt.yml +++ b/sdk/alertsmanagement/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/alertsmanagement/ci.mgmt.yml - sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/alertsmanagement/ci.mgmt.yml + - sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/analysisservices/ci.mgmt.yml b/sdk/analysisservices/ci.mgmt.yml index 33729b962d88a..d3774b3583805 100644 --- a/sdk/analysisservices/ci.mgmt.yml +++ b/sdk/analysisservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/analysisservices/ci.mgmt.yml - sdk/analysisservices/Azure.ResourceManager.Analysis/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/analysisservices/ci.mgmt.yml + - sdk/analysisservices/Azure.ResourceManager.Analysis/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/apicenter/ci.mgmt.yml b/sdk/apicenter/ci.mgmt.yml index 41c037327e330..4882d4409c0b5 100644 --- a/sdk/apicenter/ci.mgmt.yml +++ b/sdk/apicenter/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/apicenter/ci.mgmt.yml - sdk/apicenter/Azure.ResourceManager.ApiCenter/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/apicenter/ci.mgmt.yml + - sdk/apicenter/Azure.ResourceManager.ApiCenter/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/apimanagement/ci.mgmt.yml b/sdk/apimanagement/ci.mgmt.yml index b72c80a2e0e6c..2f766edb95283 100644 --- a/sdk/apimanagement/ci.mgmt.yml +++ b/sdk/apimanagement/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/apimanagement/ci.mgmt.yml - sdk/apimanagement/Azure.ResourceManager.ApiManagement/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/apimanagement/ci.mgmt.yml + - sdk/apimanagement/Azure.ResourceManager.ApiManagement/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/appcomplianceautomation/ci.mgmt.yml b/sdk/appcomplianceautomation/ci.mgmt.yml index d8a31e0139a83..7c3b00d97c17c 100644 --- a/sdk/appcomplianceautomation/ci.mgmt.yml +++ b/sdk/appcomplianceautomation/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/appcomplianceautomation/ci.mgmt.yml - sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/appcomplianceautomation/ci.mgmt.yml + - sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/appconfiguration/ci.mgmt.yml b/sdk/appconfiguration/ci.mgmt.yml index a883eaefcd594..e53dd63aca0fc 100644 --- a/sdk/appconfiguration/ci.mgmt.yml +++ b/sdk/appconfiguration/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/appconfiguration/ci.mgmt.yml - sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/appconfiguration/ci.mgmt.yml + - sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/ + # These comments should stay. extends: diff --git a/sdk/applicationinsights/ci.mgmt.yml b/sdk/applicationinsights/ci.mgmt.yml index af82b66e69521..361f4019d3222 100644 --- a/sdk/applicationinsights/ci.mgmt.yml +++ b/sdk/applicationinsights/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/applicationinsights/ci.mgmt.yml - sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/applicationinsights/ci.mgmt.yml + - sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/appplatform/ci.mgmt.yml b/sdk/appplatform/ci.mgmt.yml index 1d28b9352b6cc..023cebeb8d718 100644 --- a/sdk/appplatform/ci.mgmt.yml +++ b/sdk/appplatform/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/appplatform/ci.mgmt.yml - sdk/appplatform/Azure.ResourceManager.AppPlatform/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/appplatform/ci.mgmt.yml + - sdk/appplatform/Azure.ResourceManager.AppPlatform/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/arc-scvmm/ci.mgmt.yml b/sdk/arc-scvmm/ci.mgmt.yml index bbc2db0c9f630..53438df9d3324 100644 --- a/sdk/arc-scvmm/ci.mgmt.yml +++ b/sdk/arc-scvmm/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/arc-scvmm/ci.mgmt.yml - sdk/arc-scvmm/Azure.ResourceManager.ScVmm/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/arc-scvmm/ci.mgmt.yml + - sdk/arc-scvmm/Azure.ResourceManager.ScVmm/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/astronomer/ci.mgmt.yml b/sdk/astronomer/ci.mgmt.yml index f6099036651ce..d0de6d52b29aa 100644 --- a/sdk/astronomer/ci.mgmt.yml +++ b/sdk/astronomer/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/astronomer/ci.mgmt.yml - sdk/astronomer/Azure.ResourceManager.Astro/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/astronomer/ci.mgmt.yml + - sdk/astronomer/Azure.ResourceManager.Astro/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/attestation/ci.mgmt.yml b/sdk/attestation/ci.mgmt.yml index 51d1ac0c82401..595f887b2c356 100644 --- a/sdk/attestation/ci.mgmt.yml +++ b/sdk/attestation/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/attestation/ci.mgmt.yml - sdk/attestation/Azure.ResourceManager.Attestation/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/attestation/ci.mgmt.yml + - sdk/attestation/Azure.ResourceManager.Attestation/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/authorization/ci.mgmt.yml b/sdk/authorization/ci.mgmt.yml index 7ac32fcc55439..9c9d9638348db 100644 --- a/sdk/authorization/ci.mgmt.yml +++ b/sdk/authorization/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/authorization/ci.mgmt.yml - sdk/authorization/Azure.ResourceManager.Authorization/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/authorization/ci.mgmt.yml + - sdk/authorization/Azure.ResourceManager.Authorization/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/automanage/ci.mgmt.yml b/sdk/automanage/ci.mgmt.yml index 5a2467820b855..8e45b6506aa83 100644 --- a/sdk/automanage/ci.mgmt.yml +++ b/sdk/automanage/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/automanage/ci.mgmt.yml - sdk/automanage/Azure.ResourceManager.Automanage/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/automanage/ci.mgmt.yml + - sdk/automanage/Azure.ResourceManager.Automanage/ + extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/automation/ci.mgmt.yml b/sdk/automation/ci.mgmt.yml index 45bec5d1c1964..b2cb0f44bf225 100644 --- a/sdk/automation/ci.mgmt.yml +++ b/sdk/automation/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/automation/ci.mgmt.yml - sdk/automation/Azure.ResourceManager.Automation/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/automation/ci.mgmt.yml + - sdk/automation/Azure.ResourceManager.Automation/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/avs/ci.mgmt.yml b/sdk/avs/ci.mgmt.yml index 6404a2ba34cec..7030303dc9f44 100644 --- a/sdk/avs/ci.mgmt.yml +++ b/sdk/avs/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/avs/ci.mgmt.yml - sdk/avs/Azure.ResourceManager.Avs/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/avs/ci.mgmt.yml + - sdk/avs/Azure.ResourceManager.Avs/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/azurelargeinstance/ci.mgmt.yml b/sdk/azurelargeinstance/ci.mgmt.yml index fbe98927ef15a..d9425419d2c37 100644 --- a/sdk/azurelargeinstance/ci.mgmt.yml +++ b/sdk/azurelargeinstance/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/azurelargeinstance/ci.mgmt.yml - sdk/azurelargeinstance/Azure.ResourceManager.LargeInstance/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/azurelargeinstance/ci.mgmt.yml + - sdk/azurelargeinstance/Azure.ResourceManager.LargeInstance/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/azurestackhci/ci.mgmt.yml b/sdk/azurestackhci/ci.mgmt.yml index 89c22080e00c4..167241c22e36e 100644 --- a/sdk/azurestackhci/ci.mgmt.yml +++ b/sdk/azurestackhci/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/azurestackhci/ci.mgmt.yml - sdk/azurestackhci/Azure.ResourceManager.Hci/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/azurestackhci/ci.mgmt.yml + - sdk/azurestackhci/Azure.ResourceManager.Hci/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/batch/ci.mgmt.yml b/sdk/batch/ci.mgmt.yml index fdb37873525c8..57a9135b3c713 100644 --- a/sdk/batch/ci.mgmt.yml +++ b/sdk/batch/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/batch/ci.mgmt.yml - sdk/batch/Azure.ResourceManager.Batch/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/batch/ci.mgmt.yml + - sdk/batch/Azure.ResourceManager.Batch/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/billing/ci.mgmt.yml b/sdk/billing/ci.mgmt.yml index 67cf904850c69..0efcab4a9c907 100644 --- a/sdk/billing/ci.mgmt.yml +++ b/sdk/billing/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/billing/ci.mgmt.yml - sdk/billing/Azure.ResourceManager.Billing/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/billing/ci.mgmt.yml + - sdk/billing/Azure.ResourceManager.Billing/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/billingbenefits/ci.mgmt.yml b/sdk/billingbenefits/ci.mgmt.yml index 9900a842be4f4..d2d1e939d8cd1 100644 --- a/sdk/billingbenefits/ci.mgmt.yml +++ b/sdk/billingbenefits/ci.mgmt.yml @@ -2,6 +2,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -14,6 +15,18 @@ pr: - sdk/billingbenefits/ci.mgmt.yml - sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/billingbenefits/ci.mgmt.yml + - sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/blueprint/ci.mgmt.yml b/sdk/blueprint/ci.mgmt.yml index 65bd23b77f51b..6524937da4eeb 100644 --- a/sdk/blueprint/ci.mgmt.yml +++ b/sdk/blueprint/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/blueprint/ci.mgmt.yml - sdk/blueprint/Azure.ResourceManager.Blueprint/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/blueprint/ci.mgmt.yml + - sdk/blueprint/Azure.ResourceManager.Blueprint/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/botservice/ci.mgmt.yml b/sdk/botservice/ci.mgmt.yml index 8e5444ff3f9a8..3e991a6ebab1a 100644 --- a/sdk/botservice/ci.mgmt.yml +++ b/sdk/botservice/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/botservice/ci.mgmt.yml - sdk/botservice/Azure.ResourceManager.BotService/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/botservice/ci.mgmt.yml + - sdk/botservice/Azure.ResourceManager.BotService/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/cdn/ci.mgmt.yml b/sdk/cdn/ci.mgmt.yml index ac2ea82249d11..f1932c6d31b97 100644 --- a/sdk/cdn/ci.mgmt.yml +++ b/sdk/cdn/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/cdn/ci.mgmt.yml - sdk/cdn/Azure.ResourceManager.Cdn/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/cdn/ci.mgmt.yml + - sdk/cdn/Azure.ResourceManager.Cdn/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/changeanalysis/ci.mgmt.yml b/sdk/changeanalysis/ci.mgmt.yml index 65c6e90d195aa..aee7612c339ff 100644 --- a/sdk/changeanalysis/ci.mgmt.yml +++ b/sdk/changeanalysis/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/changeanalysis/ci.mgmt.yml - sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/changeanalysis/ci.mgmt.yml + - sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/chaos/ci.mgmt.yml b/sdk/chaos/ci.mgmt.yml index 585591bcb6bd7..a74922d279328 100644 --- a/sdk/chaos/ci.mgmt.yml +++ b/sdk/chaos/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/chaos/ci.mgmt.yml - sdk/chaos/Azure.ResourceManager.Chaos/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/chaos/ci.mgmt.yml + - sdk/chaos/Azure.ResourceManager.Chaos/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/cognitiveservices/ci.mgmt.yml b/sdk/cognitiveservices/ci.mgmt.yml index ddeb32b868ce2..79dda70912e29 100644 --- a/sdk/cognitiveservices/ci.mgmt.yml +++ b/sdk/cognitiveservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/cognitiveservices/ci.mgmt.yml - sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/cognitiveservices/ci.mgmt.yml + - sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/communication/ci.mgmt.yml b/sdk/communication/ci.mgmt.yml index 8fc73e1077450..be0c8b4b59034 100644 --- a/sdk/communication/ci.mgmt.yml +++ b/sdk/communication/ci.mgmt.yml @@ -1,5 +1,6 @@ trigger: none + pr: branches: include: @@ -12,6 +13,18 @@ pr: - sdk/communication/ci.mgmt.yml - sdk/communication/Azure.ResourceManager.Communication/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/communication/ci.mgmt.yml + - sdk/communication/Azure.ResourceManager.Communication/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/compute/ci.mgmt.yml b/sdk/compute/ci.mgmt.yml index d9520f58d12ca..9736fea82d638 100644 --- a/sdk/compute/ci.mgmt.yml +++ b/sdk/compute/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/compute/ci.mgmt.yml - sdk/compute/Azure.ResourceManager.Compute/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/compute/ci.mgmt.yml + - sdk/compute/Azure.ResourceManager.Compute/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/computefleet/ci.mgmt.yml b/sdk/computefleet/ci.mgmt.yml index de169e18c5997..58fc15347c98a 100644 --- a/sdk/computefleet/ci.mgmt.yml +++ b/sdk/computefleet/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/computefleet/ci.mgmt.yml - sdk/computefleet/Azure.ResourceManager.ComputeFleet/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/computefleet/ci.mgmt.yml + - sdk/computefleet/Azure.ResourceManager.ComputeFleet/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/computeschedule/ci.mgmt.yml b/sdk/computeschedule/ci.mgmt.yml index d3a367f825511..01d026ef37eaa 100644 --- a/sdk/computeschedule/ci.mgmt.yml +++ b/sdk/computeschedule/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/computeschedule/ci.mgmt.yml - sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/computeschedule/ci.mgmt.yml + - sdk/computeschedule/Azure.ResourceManager.ComputeSchedule/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/confidentialledger/ci.mgmt.yml b/sdk/confidentialledger/ci.mgmt.yml index 7343d843f2ee9..b61c498ed14ad 100644 --- a/sdk/confidentialledger/ci.mgmt.yml +++ b/sdk/confidentialledger/ci.mgmt.yml @@ -1,5 +1,6 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -12,6 +13,18 @@ pr: - sdk/confidentialledger/ci.mgmt.yml - sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/confidentialledger/ci.mgmt.yml + - sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/confluent/ci.mgmt.yml b/sdk/confluent/ci.mgmt.yml index 12d37aa41bd20..757508d306f93 100644 --- a/sdk/confluent/ci.mgmt.yml +++ b/sdk/confluent/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/confluent/ci.mgmt.yml - sdk/confluent/Azure.ResourceManager.Confluent/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/confluent/ci.mgmt.yml + - sdk/confluent/Azure.ResourceManager.Confluent/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/connectedvmwarevsphere/ci.mgmt.yml b/sdk/connectedvmwarevsphere/ci.mgmt.yml index a9d0db85cf821..f8990a206c45a 100644 --- a/sdk/connectedvmwarevsphere/ci.mgmt.yml +++ b/sdk/connectedvmwarevsphere/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/connectedvmwarevsphere/ci.mgmt.yml - sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/connectedvmwarevsphere/ci.mgmt.yml + - sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/consumption/ci.mgmt.yml b/sdk/consumption/ci.mgmt.yml index 6b0ebe2b2fa7e..ccda85ce57898 100644 --- a/sdk/consumption/ci.mgmt.yml +++ b/sdk/consumption/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/consumption/ci.mgmt.yml - sdk/consumption/Azure.ResourceManager.Consumption/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/consumption/ci.mgmt.yml + - sdk/consumption/Azure.ResourceManager.Consumption/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/containerapps/ci.mgmt.yml b/sdk/containerapps/ci.mgmt.yml index 7715d499fa59f..69564e2f1920d 100644 --- a/sdk/containerapps/ci.mgmt.yml +++ b/sdk/containerapps/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/containerapps/ci.mgmt.yml - sdk/containerapps/Azure.ResourceManager.AppContainers/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/containerapps/ci.mgmt.yml + - sdk/containerapps/Azure.ResourceManager.AppContainers/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/containerinstance/ci.mgmt.yml b/sdk/containerinstance/ci.mgmt.yml index 0b4d90bf6d1c1..865705313c2c8 100644 --- a/sdk/containerinstance/ci.mgmt.yml +++ b/sdk/containerinstance/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/containerinstance/ci.mgmt.yml - sdk/containerinstance/Azure.ResourceManager.ContainerInstance/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/containerinstance/ci.mgmt.yml + - sdk/containerinstance/Azure.ResourceManager.ContainerInstance/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/containerorchestratorruntime/ci.mgmt.yml b/sdk/containerorchestratorruntime/ci.mgmt.yml index 0a036386143ba..98ade1bcf8c69 100644 --- a/sdk/containerorchestratorruntime/ci.mgmt.yml +++ b/sdk/containerorchestratorruntime/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/containerorchestratorruntime/ci.mgmt.yml - sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/containerorchestratorruntime/ci.mgmt.yml + - sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/containerregistry/ci.mgmt.yml b/sdk/containerregistry/ci.mgmt.yml index e3f0cfb5bfa53..5fa9fce02790e 100644 --- a/sdk/containerregistry/ci.mgmt.yml +++ b/sdk/containerregistry/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/containerregistry/ci.mgmt.yml - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/containerregistry/ci.mgmt.yml + - sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/containerservice/ci.mgmt.yml b/sdk/containerservice/ci.mgmt.yml index 9eb58047b02e9..8eb615e701f76 100644 --- a/sdk/containerservice/ci.mgmt.yml +++ b/sdk/containerservice/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/containerservice/ci.mgmt.yml - sdk/containerservice/Azure.ResourceManager.ContainerService/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/containerservice/ci.mgmt.yml + - sdk/containerservice/Azure.ResourceManager.ContainerService/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/cosmosdb/ci.mgmt.yml b/sdk/cosmosdb/ci.mgmt.yml index 1eab24b3bbf9e..ac1fce954c2ac 100644 --- a/sdk/cosmosdb/ci.mgmt.yml +++ b/sdk/cosmosdb/ci.mgmt.yml @@ -2,6 +2,7 @@ # This file is generated automatically and any changes will be lost. trigger: none + pr: branches: include: @@ -14,6 +15,18 @@ pr: - sdk/cosmosdb/ci.mgmt.yml - sdk/cosmosdb/Azure.ResourceManager.CosmosDB/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/cosmosdb/ci.mgmt.yml + - sdk/cosmosdb/Azure.ResourceManager.CosmosDB/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/cosmosdbforpostgresql/ci.mgmt.yml b/sdk/cosmosdbforpostgresql/ci.mgmt.yml index ef6098c3999f9..bfe2761181a8c 100644 --- a/sdk/cosmosdbforpostgresql/ci.mgmt.yml +++ b/sdk/cosmosdbforpostgresql/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/cosmosdbforpostgresql/ci.mgmt.yml - sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/cosmosdbforpostgresql/ci.mgmt.yml + - sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/costmanagement/ci.mgmt.yml b/sdk/costmanagement/ci.mgmt.yml index e59280ba6be22..cee9459831fbf 100644 --- a/sdk/costmanagement/ci.mgmt.yml +++ b/sdk/costmanagement/ci.mgmt.yml @@ -2,6 +2,7 @@ # This file is generated automatically and any changes will be lost. trigger: none + pr: branches: include: @@ -14,6 +15,18 @@ pr: - sdk/costmanagement/ci.mgmt.yml - sdk/costmanagement/Azure.ResourceManager.CostManagement/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/costmanagement/ci.mgmt.yml + - sdk/costmanagement/Azure.ResourceManager.CostManagement/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/customer-insights/ci.mgmt.yml b/sdk/customer-insights/ci.mgmt.yml index 124af418dcfaa..a5d4f1a60cb57 100644 --- a/sdk/customer-insights/ci.mgmt.yml +++ b/sdk/customer-insights/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/customer-insights/ci.mgmt.yml - sdk/customer-insights/Azure.ResourceManager.CustomerInsights/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/customer-insights/ci.mgmt.yml + - sdk/customer-insights/Azure.ResourceManager.CustomerInsights/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/databox/ci.mgmt.yml b/sdk/databox/ci.mgmt.yml index edd63a7017009..6525b0b436ccb 100644 --- a/sdk/databox/ci.mgmt.yml +++ b/sdk/databox/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/databox/ci.mgmt.yml - sdk/databox/Azure.ResourceManager.DataBox/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/databox/ci.mgmt.yml + - sdk/databox/Azure.ResourceManager.DataBox/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/databoxedge/ci.mgmt.yml b/sdk/databoxedge/ci.mgmt.yml index 29e3b1537c782..3cf952bd82f3b 100644 --- a/sdk/databoxedge/ci.mgmt.yml +++ b/sdk/databoxedge/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/databoxedge/ci.mgmt.yml - sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/databoxedge/ci.mgmt.yml + - sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/datadog/ci.mgmt.yml b/sdk/datadog/ci.mgmt.yml index 9e9d6825d8b09..c1b66f6edb09c 100644 --- a/sdk/datadog/ci.mgmt.yml +++ b/sdk/datadog/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/datadog/ci.mgmt.yml - sdk/datadog/Azure.ResourceManager.Datadog/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/datadog/ci.mgmt.yml + - sdk/datadog/Azure.ResourceManager.Datadog/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/datafactory/ci.mgmt.yml b/sdk/datafactory/ci.mgmt.yml index 85d246a5d4e7e..1f1a4ba295cd1 100644 --- a/sdk/datafactory/ci.mgmt.yml +++ b/sdk/datafactory/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/datafactory/ci.mgmt.yml - sdk/datafactory/Azure.ResourceManager.DataFactory/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/datafactory/ci.mgmt.yml + - sdk/datafactory/Azure.ResourceManager.DataFactory/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/datalake-analytics/ci.mgmt.yml b/sdk/datalake-analytics/ci.mgmt.yml index b8794cd18f9e4..44823b2f94442 100644 --- a/sdk/datalake-analytics/ci.mgmt.yml +++ b/sdk/datalake-analytics/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/datalake-analytics/ci.mgmt.yml - sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/datalake-analytics/ci.mgmt.yml + - sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/datalake-store/ci.mgmt.yml b/sdk/datalake-store/ci.mgmt.yml index 469839fd30241..27295ad1c28c5 100644 --- a/sdk/datalake-store/ci.mgmt.yml +++ b/sdk/datalake-store/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/datalake-store/ci.mgmt.yml - sdk/datalake-store/Azure.ResourceManager.DataLakeStore/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/datalake-store/ci.mgmt.yml + - sdk/datalake-store/Azure.ResourceManager.DataLakeStore/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/datamigration/ci.mgmt.yml b/sdk/datamigration/ci.mgmt.yml index 1e64024fed175..f26452e1de486 100644 --- a/sdk/datamigration/ci.mgmt.yml +++ b/sdk/datamigration/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/datamigration/ci.mgmt.yml - sdk/datamigration/Azure.ResourceManager.DataMigration/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/datamigration/ci.mgmt.yml + - sdk/datamigration/Azure.ResourceManager.DataMigration/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/dataprotection/ci.mgmt.yml b/sdk/dataprotection/ci.mgmt.yml index 25637090aedb1..0b74e9436cc75 100644 --- a/sdk/dataprotection/ci.mgmt.yml +++ b/sdk/dataprotection/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/dataprotection/ci.mgmt.yml - sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/dataprotection/ci.mgmt.yml + - sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/datashare/ci.mgmt.yml b/sdk/datashare/ci.mgmt.yml index f6dd41e0f37f1..dcb3801e3f58f 100644 --- a/sdk/datashare/ci.mgmt.yml +++ b/sdk/datashare/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/datashare/ci.mgmt.yml - sdk/datashare/Azure.ResourceManager.DataShare/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/datashare/ci.mgmt.yml + - sdk/datashare/Azure.ResourceManager.DataShare/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/defendereasm/ci.mgmt.yml b/sdk/defendereasm/ci.mgmt.yml index dd90e5a466901..2dc5c04ec007f 100644 --- a/sdk/defendereasm/ci.mgmt.yml +++ b/sdk/defendereasm/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/defendereasm/ci.mgmt.yml - sdk/defendereasm/Azure.ResourceManager.DefenderEasm/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/defendereasm/ci.mgmt.yml + - sdk/defendereasm/Azure.ResourceManager.DefenderEasm/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/desktopvirtualization/ci.mgmt.yml b/sdk/desktopvirtualization/ci.mgmt.yml index 3d6f40025c779..b6af32cc15c34 100644 --- a/sdk/desktopvirtualization/ci.mgmt.yml +++ b/sdk/desktopvirtualization/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/desktopvirtualization/ci.mgmt.yml - sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/desktopvirtualization/ci.mgmt.yml + - sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/devcenter/ci.mgmt.yml b/sdk/devcenter/ci.mgmt.yml index 136d77bbba6dd..cfa8320239ddd 100644 --- a/sdk/devcenter/ci.mgmt.yml +++ b/sdk/devcenter/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/devcenter/ci.mgmt.yml - sdk/devcenter/Azure.ResourceManager.DevCenter/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/devcenter/ci.mgmt.yml + - sdk/devcenter/Azure.ResourceManager.DevCenter/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/deviceprovisioningservices/ci.mgmt.yml b/sdk/deviceprovisioningservices/ci.mgmt.yml index f9c94973a3244..733989d927dc2 100644 --- a/sdk/deviceprovisioningservices/ci.mgmt.yml +++ b/sdk/deviceprovisioningservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/deviceprovisioningservices/ci.mgmt.yml - sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/deviceprovisioningservices/ci.mgmt.yml + - sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/deviceregistry/ci.mgmt.yml b/sdk/deviceregistry/ci.mgmt.yml index 05fffe3011148..271e718d86760 100644 --- a/sdk/deviceregistry/ci.mgmt.yml +++ b/sdk/deviceregistry/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/deviceregistry/ci.mgmt.yml - sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/deviceregistry/ci.mgmt.yml + - sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/deviceupdate/ci.mgmt.yml b/sdk/deviceupdate/ci.mgmt.yml index c1315e462bb92..d8abd00a22562 100644 --- a/sdk/deviceupdate/ci.mgmt.yml +++ b/sdk/deviceupdate/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/deviceupdate/ci.mgmt.yml - sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/deviceupdate/ci.mgmt.yml + - sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/devopsinfrastructure/ci.mgmt.yml b/sdk/devopsinfrastructure/ci.mgmt.yml index 0f2db1225cf00..8e463b9f37949 100644 --- a/sdk/devopsinfrastructure/ci.mgmt.yml +++ b/sdk/devopsinfrastructure/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/devopsinfrastructure/ci.mgmt.yml - sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/devopsinfrastructure/ci.mgmt.yml + - sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/devspaces/ci.mgmt.yml b/sdk/devspaces/ci.mgmt.yml index b63234a645556..248d3c3143f09 100644 --- a/sdk/devspaces/ci.mgmt.yml +++ b/sdk/devspaces/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/devspaces/ci.mgmt.yml - sdk/devspaces/Azure.ResourceManager.DevSpaces/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/devspaces/ci.mgmt.yml + - sdk/devspaces/Azure.ResourceManager.DevSpaces/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/devtestlabs/ci.mgmt.yml b/sdk/devtestlabs/ci.mgmt.yml index 1946409a6b752..7ee994de378bd 100644 --- a/sdk/devtestlabs/ci.mgmt.yml +++ b/sdk/devtestlabs/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/devtestlabs/ci.mgmt.yml - sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/devtestlabs/ci.mgmt.yml + - sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/digitaltwins/ci.mgmt.yml b/sdk/digitaltwins/ci.mgmt.yml index a0e8233a36cfc..a8766e215b7cb 100644 --- a/sdk/digitaltwins/ci.mgmt.yml +++ b/sdk/digitaltwins/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/digitaltwins/ci.mgmt.yml - sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/digitaltwins/ci.mgmt.yml + - sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/dns/ci.mgmt.yml b/sdk/dns/ci.mgmt.yml index 8357809b4e6f4..ec6edfb217751 100644 --- a/sdk/dns/ci.mgmt.yml +++ b/sdk/dns/ci.mgmt.yml @@ -2,6 +2,7 @@ # This file is generated automatically and any changes will be lost. trigger: none + pr: branches: include: @@ -14,6 +15,18 @@ pr: - sdk/dns/ci.mgmt.yml - sdk/dns/Azure.ResourceManager.Dns/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/dns/ci.mgmt.yml + - sdk/dns/Azure.ResourceManager.Dns/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/dnsresolver/ci.mgmt.yml b/sdk/dnsresolver/ci.mgmt.yml index afa270cdc600e..6b2569c11c492 100644 --- a/sdk/dnsresolver/ci.mgmt.yml +++ b/sdk/dnsresolver/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/dnsresolver/ci.mgmt.yml - sdk/dnsresolver/Azure.ResourceManager.DnsResolver/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/dnsresolver/ci.mgmt.yml + - sdk/dnsresolver/Azure.ResourceManager.DnsResolver/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/dynatrace/ci.mgmt.yml b/sdk/dynatrace/ci.mgmt.yml index f76bf3a316af6..fe97a3c1f612e 100644 --- a/sdk/dynatrace/ci.mgmt.yml +++ b/sdk/dynatrace/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/dynatrace/ci.mgmt.yml - sdk/dynatrace/Azure.ResourceManager.Dynatrace/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/dynatrace/ci.mgmt.yml + - sdk/dynatrace/Azure.ResourceManager.Dynatrace/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/edgeorder/ci.mgmt.yml b/sdk/edgeorder/ci.mgmt.yml index 4d1fbaa121f94..cb4d87c29a1b4 100644 --- a/sdk/edgeorder/ci.mgmt.yml +++ b/sdk/edgeorder/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/edgeorder/ci.mgmt.yml - sdk/edgeorder/Azure.ResourceManager.EdgeOrder/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/edgeorder/ci.mgmt.yml + - sdk/edgeorder/Azure.ResourceManager.EdgeOrder/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/edgezones/ci.mgmt.yml b/sdk/edgezones/ci.mgmt.yml index 9dc8d79aab306..ebed00842581d 100644 --- a/sdk/edgezones/ci.mgmt.yml +++ b/sdk/edgezones/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/edgezones/ci.mgmt.yml - sdk/edgezones/Azure.ResourceManager.EdgeZones/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/edgezones/ci.mgmt.yml + - sdk/edgezones/Azure.ResourceManager.EdgeZones/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/elastic/ci.mgmt.yml b/sdk/elastic/ci.mgmt.yml index 76ecd8b3923dd..2e29070fce4a1 100644 --- a/sdk/elastic/ci.mgmt.yml +++ b/sdk/elastic/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/elastic/ci.mgmt.yml - sdk/elastic/Azure.ResourceManager.Elastic/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/elastic/ci.mgmt.yml + - sdk/elastic/Azure.ResourceManager.Elastic/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/elasticsan/ci.mgmt.yml b/sdk/elasticsan/ci.mgmt.yml index 7e2bb35dde217..dba4416415e9b 100644 --- a/sdk/elasticsan/ci.mgmt.yml +++ b/sdk/elasticsan/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/elasticsan/ci.mgmt.yml - sdk/elasticsan/Azure.ResourceManager.ElasticSan/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/elasticsan/ci.mgmt.yml + - sdk/elasticsan/Azure.ResourceManager.ElasticSan/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/eventgrid/ci.mgmt.yml b/sdk/eventgrid/ci.mgmt.yml index cb02a1b84e8ba..1b2eaffc0fddb 100644 --- a/sdk/eventgrid/ci.mgmt.yml +++ b/sdk/eventgrid/ci.mgmt.yml @@ -2,6 +2,7 @@ # This is for Track 2 managment plane SDK trigger: none + pr: branches: include: @@ -14,6 +15,18 @@ pr: - sdk/eventgrid/ci.mgmt.yml - sdk/eventgrid/Azure.ResourceManager.EventGrid/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/eventgrid/ci.mgmt.yml + - sdk/eventgrid/Azure.ResourceManager.EventGrid/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/eventhub/ci.mgmt.yml b/sdk/eventhub/ci.mgmt.yml index b7c0045fffb31..dadda2db6dc55 100644 --- a/sdk/eventhub/ci.mgmt.yml +++ b/sdk/eventhub/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/eventhub/ci.mgmt.yml - sdk/eventhub/Azure.ResourceManager.EventHubs/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/eventhub/ci.mgmt.yml + - sdk/eventhub/Azure.ResourceManager.EventHubs/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/extendedlocation/ci.mgmt.yml b/sdk/extendedlocation/ci.mgmt.yml index 4fb53374be742..e9c6939e2b1d0 100644 --- a/sdk/extendedlocation/ci.mgmt.yml +++ b/sdk/extendedlocation/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/extendedlocation/ci.mgmt.yml - sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/extendedlocation/ci.mgmt.yml + - sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/fabric/ci.mgmt.yml b/sdk/fabric/ci.mgmt.yml index d0bc6cea6eb9f..5cc91d0c8722e 100644 --- a/sdk/fabric/ci.mgmt.yml +++ b/sdk/fabric/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/fabric/ci.mgmt.yml - sdk/fabric/Azure.ResourceManager.Fabric/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/fabric/ci.mgmt.yml + - sdk/fabric/Azure.ResourceManager.Fabric/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/fleet/ci.mgmt.yml b/sdk/fleet/ci.mgmt.yml index 09a225882401d..469d40cad6191 100644 --- a/sdk/fleet/ci.mgmt.yml +++ b/sdk/fleet/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/fleet/ci.mgmt.yml - sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/fleet/ci.mgmt.yml + - sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/fluidrelay/ci.mgmt.yml b/sdk/fluidrelay/ci.mgmt.yml index d43dfe94d7297..1673db3a9f269 100644 --- a/sdk/fluidrelay/ci.mgmt.yml +++ b/sdk/fluidrelay/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/fluidrelay/ci.mgmt.yml - sdk/fluidrelay/Azure.ResourceManager.FluidRelay/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/fluidrelay/ci.mgmt.yml + - sdk/fluidrelay/Azure.ResourceManager.FluidRelay/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/frontdoor/ci.mgmt.yml b/sdk/frontdoor/ci.mgmt.yml index bff9dbcae78c2..f19923a1b43de 100644 --- a/sdk/frontdoor/ci.mgmt.yml +++ b/sdk/frontdoor/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/frontdoor/ci.mgmt.yml - sdk/frontdoor/Azure.ResourceManager.FrontDoor/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/frontdoor/ci.mgmt.yml + - sdk/frontdoor/Azure.ResourceManager.FrontDoor/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/grafana/ci.mgmt.yml b/sdk/grafana/ci.mgmt.yml index a2f22e6ee33b1..848173351b4d4 100644 --- a/sdk/grafana/ci.mgmt.yml +++ b/sdk/grafana/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/grafana/ci.mgmt.yml - sdk/grafana/Azure.ResourceManager.Grafana/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/grafana/ci.mgmt.yml + - sdk/grafana/Azure.ResourceManager.Grafana/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/graphservices/ci.mgmt.yml b/sdk/graphservices/ci.mgmt.yml index 717a9a4a19633..ccd14b614b43a 100644 --- a/sdk/graphservices/ci.mgmt.yml +++ b/sdk/graphservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/graphservices/ci.mgmt.yml - sdk/graphservices/Azure.ResourceManager.GraphServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/graphservices/ci.mgmt.yml + - sdk/graphservices/Azure.ResourceManager.GraphServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/guestconfiguration/ci.mgmt.yml b/sdk/guestconfiguration/ci.mgmt.yml index 5ebc59550f58e..c2d2526d488ba 100644 --- a/sdk/guestconfiguration/ci.mgmt.yml +++ b/sdk/guestconfiguration/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/guestconfiguration/ci.mgmt.yml - sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/guestconfiguration/ci.mgmt.yml + - sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hardwaresecuritymodules/ci.mgmt.yml b/sdk/hardwaresecuritymodules/ci.mgmt.yml index 21778711f99e5..d94eea966253a 100644 --- a/sdk/hardwaresecuritymodules/ci.mgmt.yml +++ b/sdk/hardwaresecuritymodules/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hardwaresecuritymodules/ci.mgmt.yml - sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hardwaresecuritymodules/ci.mgmt.yml + - sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hdinsight/ci.mgmt.yml b/sdk/hdinsight/ci.mgmt.yml index 4df0a02f5c80d..29d3b404c76a7 100644 --- a/sdk/hdinsight/ci.mgmt.yml +++ b/sdk/hdinsight/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hdinsight/ci.mgmt.yml - sdk/hdinsight/Azure.ResourceManager.HDInsight/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hdinsight/ci.mgmt.yml + - sdk/hdinsight/Azure.ResourceManager.HDInsight/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hdinsightcontainers/ci.mgmt.yml b/sdk/hdinsightcontainers/ci.mgmt.yml index 69a7566e0caa6..66a879d8fbcd1 100644 --- a/sdk/hdinsightcontainers/ci.mgmt.yml +++ b/sdk/hdinsightcontainers/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hdinsightcontainers/ci.mgmt.yml - sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hdinsightcontainers/ci.mgmt.yml + - sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/healthbot/ci.mgmt.yml b/sdk/healthbot/ci.mgmt.yml index 14bfc7f855e62..4c2698659502f 100644 --- a/sdk/healthbot/ci.mgmt.yml +++ b/sdk/healthbot/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/healthbot/ci.mgmt.yml - sdk/healthbot/Azure.ResourceManager.HealthBot/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/healthbot/ci.mgmt.yml + - sdk/healthbot/Azure.ResourceManager.HealthBot/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/healthcareapis/ci.mgmt.yml b/sdk/healthcareapis/ci.mgmt.yml index 57030df35e566..6f02ac8fd023e 100644 --- a/sdk/healthcareapis/ci.mgmt.yml +++ b/sdk/healthcareapis/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/healthcareapis/ci.mgmt.yml - sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/healthcareapis/ci.mgmt.yml + - sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/healthdataaiservices/ci.mgmt.yml b/sdk/healthdataaiservices/ci.mgmt.yml index 016a917c1e19c..45857afa5722a 100644 --- a/sdk/healthdataaiservices/ci.mgmt.yml +++ b/sdk/healthdataaiservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/healthdataaiservices/ci.mgmt.yml - sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/healthdataaiservices/ci.mgmt.yml + - sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hybridaks/ci.mgmt.yml b/sdk/hybridaks/ci.mgmt.yml index 552eb3298d3a0..af3d82703d11a 100644 --- a/sdk/hybridaks/ci.mgmt.yml +++ b/sdk/hybridaks/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hybridaks/ci.mgmt.yml - sdk/hybridaks/Azure.ResourceManager.HybridContainerService/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hybridaks/ci.mgmt.yml + - sdk/hybridaks/Azure.ResourceManager.HybridContainerService/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hybridcompute/ci.mgmt.yml b/sdk/hybridcompute/ci.mgmt.yml index d163a966512d4..15f8656c399e0 100644 --- a/sdk/hybridcompute/ci.mgmt.yml +++ b/sdk/hybridcompute/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hybridcompute/ci.mgmt.yml - sdk/hybridcompute/Azure.ResourceManager.HybridCompute/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hybridcompute/ci.mgmt.yml + - sdk/hybridcompute/Azure.ResourceManager.HybridCompute/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hybridconnectivity/ci.mgmt.yml b/sdk/hybridconnectivity/ci.mgmt.yml index 9ccca42ef5571..8d809d4d96339 100644 --- a/sdk/hybridconnectivity/ci.mgmt.yml +++ b/sdk/hybridconnectivity/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hybridconnectivity/ci.mgmt.yml - sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hybridconnectivity/ci.mgmt.yml + - sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hybridkubernetes/ci.mgmt.yml b/sdk/hybridkubernetes/ci.mgmt.yml index fff768430c9d9..bb98635a8e1ce 100644 --- a/sdk/hybridkubernetes/ci.mgmt.yml +++ b/sdk/hybridkubernetes/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hybridkubernetes/ci.mgmt.yml - sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hybridkubernetes/ci.mgmt.yml + - sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hybridnetwork/ci.mgmt.yml b/sdk/hybridnetwork/ci.mgmt.yml index 35f71f8ae8705..39412ff81f054 100644 --- a/sdk/hybridnetwork/ci.mgmt.yml +++ b/sdk/hybridnetwork/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hybridnetwork/ci.mgmt.yml - sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hybridnetwork/ci.mgmt.yml + - sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/informaticadatamanagement/ci.mgmt.yml b/sdk/informaticadatamanagement/ci.mgmt.yml index 03013cc9c90bf..82d3bafd3f7f2 100644 --- a/sdk/informaticadatamanagement/ci.mgmt.yml +++ b/sdk/informaticadatamanagement/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/informaticadatamanagement/ci.mgmt.yml - sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/informaticadatamanagement/ci.mgmt.yml + - sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/iot/ci.mgmt.yml b/sdk/iot/ci.mgmt.yml index 6260cd0d71f2b..199578b03331a 100644 --- a/sdk/iot/ci.mgmt.yml +++ b/sdk/iot/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/iot/ci.mgmt.yml - sdk/iot/Azure.ResourceManager.IotFirmwareDefense/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/iot/ci.mgmt.yml + - sdk/iot/Azure.ResourceManager.IotFirmwareDefense/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/iotcentral/ci.mgmt.yml b/sdk/iotcentral/ci.mgmt.yml index 1702fd71c6dd8..1225f99c37fdb 100644 --- a/sdk/iotcentral/ci.mgmt.yml +++ b/sdk/iotcentral/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/iotcentral/ci.mgmt.yml - sdk/iotcentral/Azure.ResourceManager.IotCentral/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/iotcentral/ci.mgmt.yml + - sdk/iotcentral/Azure.ResourceManager.IotCentral/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/iothub/ci.mgmt.yml b/sdk/iothub/ci.mgmt.yml index 5eb9e999a89c3..63fb10994eac4 100644 --- a/sdk/iothub/ci.mgmt.yml +++ b/sdk/iothub/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/iothub/ci.mgmt.yml - sdk/iothub/Azure.ResourceManager.IotHub/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/iothub/ci.mgmt.yml + - sdk/iothub/Azure.ResourceManager.IotHub/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/keyvault/ci.mgmt.yml b/sdk/keyvault/ci.mgmt.yml index b48c2f8d4ff49..8ad905079a0ac 100644 --- a/sdk/keyvault/ci.mgmt.yml +++ b/sdk/keyvault/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/keyvault/ci.mgmt.yml - sdk/keyvault/Azure.ResourceManager.KeyVault/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/keyvault/ci.mgmt.yml + - sdk/keyvault/Azure.ResourceManager.KeyVault/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/kubernetesconfiguration/ci.mgmt.yml b/sdk/kubernetesconfiguration/ci.mgmt.yml index 4249ef57fa6ea..d3fb470a7b6ec 100644 --- a/sdk/kubernetesconfiguration/ci.mgmt.yml +++ b/sdk/kubernetesconfiguration/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/kubernetesconfiguration/ci.mgmt.yml - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/kubernetesconfiguration/ci.mgmt.yml + - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/kusto/ci.mgmt.yml b/sdk/kusto/ci.mgmt.yml index 374cf1f0cb812..c410d1487d18b 100644 --- a/sdk/kusto/ci.mgmt.yml +++ b/sdk/kusto/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/kusto/ci.mgmt.yml - sdk/kusto/Azure.ResourceManager.Kusto/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/kusto/ci.mgmt.yml + - sdk/kusto/Azure.ResourceManager.Kusto/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/labservices/ci.mgmt.yml b/sdk/labservices/ci.mgmt.yml index 48f80379ab14b..f8a9820729656 100644 --- a/sdk/labservices/ci.mgmt.yml +++ b/sdk/labservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/labservices/ci.mgmt.yml - sdk/labservices/Azure.ResourceManager.LabServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/labservices/ci.mgmt.yml + - sdk/labservices/Azure.ResourceManager.LabServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/loadtestservice/ci.mgmt.yml b/sdk/loadtestservice/ci.mgmt.yml index 4e3d99d429796..dfc32939e4973 100644 --- a/sdk/loadtestservice/ci.mgmt.yml +++ b/sdk/loadtestservice/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/loadtestservice/ci.mgmt.yml - sdk/loadtestservice/Azure.ResourceManager.LoadTesting/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/loadtestservice/ci.mgmt.yml + - sdk/loadtestservice/Azure.ResourceManager.LoadTesting/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/logic/ci.mgmt.yml b/sdk/logic/ci.mgmt.yml index b89b224082ee6..5bed51facd34b 100644 --- a/sdk/logic/ci.mgmt.yml +++ b/sdk/logic/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/logic/ci.mgmt.yml - sdk/logic/Azure.ResourceManager.Logic/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/logic/ci.mgmt.yml + - sdk/logic/Azure.ResourceManager.Logic/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/machinelearningcompute/ci.mgmt.yml b/sdk/machinelearningcompute/ci.mgmt.yml index 9ea84fdf4d158..5ea6192311915 100644 --- a/sdk/machinelearningcompute/ci.mgmt.yml +++ b/sdk/machinelearningcompute/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/machinelearningcompute/ci.mgmt.yml - sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/machinelearningcompute/ci.mgmt.yml + - sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/machinelearningservices/ci.mgmt.yml b/sdk/machinelearningservices/ci.mgmt.yml index 457299ab20b95..3a99ed224fc24 100644 --- a/sdk/machinelearningservices/ci.mgmt.yml +++ b/sdk/machinelearningservices/ci.mgmt.yml @@ -1,5 +1,6 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -12,6 +13,18 @@ pr: - sdk/machinelearningservices/ci.mgmt.yml - sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/machinelearningservices/ci.mgmt.yml + - sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/maintenance/ci.mgmt.yml b/sdk/maintenance/ci.mgmt.yml index c49cc1565d6d0..94c552b69f26b 100644 --- a/sdk/maintenance/ci.mgmt.yml +++ b/sdk/maintenance/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/maintenance/ci.mgmt.yml - sdk/maintenance/Azure.ResourceManager.Maintenance/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/maintenance/ci.mgmt.yml + - sdk/maintenance/Azure.ResourceManager.Maintenance/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/managednetwork/ci.mgmt.yml b/sdk/managednetwork/ci.mgmt.yml index 431d66d1245b1..08c9f3d0ce551 100644 --- a/sdk/managednetwork/ci.mgmt.yml +++ b/sdk/managednetwork/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/managednetwork/ci.mgmt.yml - sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/managednetwork/ci.mgmt.yml + - sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/managednetworkfabric/ci.mgmt.yml b/sdk/managednetworkfabric/ci.mgmt.yml index aa6b571b04e29..3212ad45bbdeb 100644 --- a/sdk/managednetworkfabric/ci.mgmt.yml +++ b/sdk/managednetworkfabric/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/managednetworkfabric/ci.mgmt.yml - sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/managednetworkfabric/ci.mgmt.yml + - sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/managedserviceidentity/ci.mgmt.yml b/sdk/managedserviceidentity/ci.mgmt.yml index c8f3a187f9189..c9cd4b0f235af 100644 --- a/sdk/managedserviceidentity/ci.mgmt.yml +++ b/sdk/managedserviceidentity/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/managedserviceidentity/ci.mgmt.yml - sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/managedserviceidentity/ci.mgmt.yml + - sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/ + extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/managedservices/ci.mgmt.yml b/sdk/managedservices/ci.mgmt.yml index d6c0ccd16eefe..88360bb2defa8 100644 --- a/sdk/managedservices/ci.mgmt.yml +++ b/sdk/managedservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/managedservices/ci.mgmt.yml - sdk/managedservices/Azure.ResourceManager.ManagedServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/managedservices/ci.mgmt.yml + - sdk/managedservices/Azure.ResourceManager.ManagedServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/managementpartner/ci.mgmt.yml b/sdk/managementpartner/ci.mgmt.yml index 52c8e762088ee..6fdd0118e1b9e 100644 --- a/sdk/managementpartner/ci.mgmt.yml +++ b/sdk/managementpartner/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/managementpartner/ci.mgmt.yml - sdk/managementpartner/Azure.ResourceManager.ManagementPartner/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/managementpartner/ci.mgmt.yml + - sdk/managementpartner/Azure.ResourceManager.ManagementPartner/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/maps/ci.mgmt.yml b/sdk/maps/ci.mgmt.yml index 2f16079cab2e5..7ee4f1ddad3c0 100644 --- a/sdk/maps/ci.mgmt.yml +++ b/sdk/maps/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/maps/ci.mgmt.yml - sdk/maps/Azure.ResourceManager.Maps/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/maps/ci.mgmt.yml + - sdk/maps/Azure.ResourceManager.Maps/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/marketplace/ci.mgmt.yml b/sdk/marketplace/ci.mgmt.yml index e6574bdb30392..42bc8a147b306 100644 --- a/sdk/marketplace/ci.mgmt.yml +++ b/sdk/marketplace/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/marketplace/ci.mgmt.yml - sdk/marketplace/Azure.ResourceManager.Marketplace/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/marketplace/ci.mgmt.yml + - sdk/marketplace/Azure.ResourceManager.Marketplace/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/marketplaceordering/ci.mgmt.yml b/sdk/marketplaceordering/ci.mgmt.yml index 2b1f8721902e3..c602647fb32d4 100644 --- a/sdk/marketplaceordering/ci.mgmt.yml +++ b/sdk/marketplaceordering/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/marketplaceordering/ci.mgmt.yml - sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/marketplaceordering/ci.mgmt.yml + - sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/mediaservices/ci.mgmt.yml b/sdk/mediaservices/ci.mgmt.yml index 55656f3ae48b0..201ecc9d995df 100644 --- a/sdk/mediaservices/ci.mgmt.yml +++ b/sdk/mediaservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/mediaservices/ci.mgmt.yml - sdk/mediaservices/Azure.ResourceManager.Media/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/mediaservices/ci.mgmt.yml + - sdk/mediaservices/Azure.ResourceManager.Media/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/migrationdiscoverysap/ci.mgmt.yml b/sdk/migrationdiscoverysap/ci.mgmt.yml index f5eb354d28e7f..26c079f3d6f5e 100644 --- a/sdk/migrationdiscoverysap/ci.mgmt.yml +++ b/sdk/migrationdiscoverysap/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/migrationdiscoverysap/ci.mgmt.yml - sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/migrationdiscoverysap/ci.mgmt.yml + - sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/mixedreality/ci.mgmt.yml b/sdk/mixedreality/ci.mgmt.yml index 81c0c2744232c..d342a10a32e04 100644 --- a/sdk/mixedreality/ci.mgmt.yml +++ b/sdk/mixedreality/ci.mgmt.yml @@ -1,5 +1,6 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -12,6 +13,18 @@ pr: - sdk/mixedreality/ci.mgmt.yml - sdk/mixedreality/Azure.ResourceManager.MixedReality/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/mixedreality/ci.mgmt.yml + - sdk/mixedreality/Azure.ResourceManager.MixedReality/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/mobilenetwork/ci.mgmt.yml b/sdk/mobilenetwork/ci.mgmt.yml index 8a68e6749ba77..325154bfbfb76 100644 --- a/sdk/mobilenetwork/ci.mgmt.yml +++ b/sdk/mobilenetwork/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/mobilenetwork/ci.mgmt.yml - sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/mobilenetwork/ci.mgmt.yml + - sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/ + extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/mongocluster/ci.mgmt.yml b/sdk/mongocluster/ci.mgmt.yml index d2eafe7877ddf..10f6e93db8bc9 100644 --- a/sdk/mongocluster/ci.mgmt.yml +++ b/sdk/mongocluster/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/mongocluster/ci.mgmt.yml - sdk/mongocluster/Azure.ResourceManager.MongoCluster/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/mongocluster/ci.mgmt.yml + - sdk/mongocluster/Azure.ResourceManager.MongoCluster/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/monitor/ci.mgmt.yml b/sdk/monitor/ci.mgmt.yml index 8beeded4e3b9e..5933fd35d9e56 100644 --- a/sdk/monitor/ci.mgmt.yml +++ b/sdk/monitor/ci.mgmt.yml @@ -2,6 +2,7 @@ # This file is generated automatically and any changes will be lost. trigger: none + pr: branches: include: @@ -14,6 +15,18 @@ pr: - sdk/monitor/ci.mgmt.yml - sdk/monitor/Azure.ResourceManager.Monitor/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/monitor/ci.mgmt.yml + - sdk/monitor/Azure.ResourceManager.Monitor/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/mysql/ci.mgmt.yml b/sdk/mysql/ci.mgmt.yml index e1521b4ed568d..2ba5627ae3fcf 100644 --- a/sdk/mysql/ci.mgmt.yml +++ b/sdk/mysql/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/mysql/ci.mgmt.yml - sdk/mysql/Azure.ResourceManager.MySql/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/mysql/ci.mgmt.yml + - sdk/mysql/Azure.ResourceManager.MySql/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/neonpostgres/ci.mgmt.yml b/sdk/neonpostgres/ci.mgmt.yml index 72d449fc7a16d..00f734ba72302 100644 --- a/sdk/neonpostgres/ci.mgmt.yml +++ b/sdk/neonpostgres/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/neonpostgres/ci.mgmt.yml - sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/neonpostgres/ci.mgmt.yml + - sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/netapp/ci.mgmt.yml b/sdk/netapp/ci.mgmt.yml index 05a683e910f5c..5d0a3e7415135 100644 --- a/sdk/netapp/ci.mgmt.yml +++ b/sdk/netapp/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/netapp/ci.mgmt.yml - sdk/netapp/Azure.ResourceManager.NetApp/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/netapp/ci.mgmt.yml + - sdk/netapp/Azure.ResourceManager.NetApp/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/network/ci.mgmt.yml b/sdk/network/ci.mgmt.yml index edf77de02a498..f69378e6c236b 100644 --- a/sdk/network/ci.mgmt.yml +++ b/sdk/network/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/network/ci.mgmt.yml - sdk/network/Azure.ResourceManager.Network/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/network/ci.mgmt.yml + - sdk/network/Azure.ResourceManager.Network/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/networkanalytics/ci.mgmt.yml b/sdk/networkanalytics/ci.mgmt.yml index 9ece072ce8670..52934a1bad242 100644 --- a/sdk/networkanalytics/ci.mgmt.yml +++ b/sdk/networkanalytics/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/networkanalytics/ci.mgmt.yml - sdk/networkanalytics/Azure.ResourceManager.NetworkAnalytics/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/networkanalytics/ci.mgmt.yml + - sdk/networkanalytics/Azure.ResourceManager.NetworkAnalytics/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/networkcloud/ci.mgmt.yml b/sdk/networkcloud/ci.mgmt.yml index f6c281af22a94..940f908b8c752 100644 --- a/sdk/networkcloud/ci.mgmt.yml +++ b/sdk/networkcloud/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/networkcloud/ci.mgmt.yml - sdk/networkcloud/Azure.ResourceManager.NetworkCloud/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/networkcloud/ci.mgmt.yml + - sdk/networkcloud/Azure.ResourceManager.NetworkCloud/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/networkfunction/ci.mgmt.yml b/sdk/networkfunction/ci.mgmt.yml index a3c743ef532ab..b05cf6e5e1cce 100644 --- a/sdk/networkfunction/ci.mgmt.yml +++ b/sdk/networkfunction/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/networkfunction/ci.mgmt.yml - sdk/networkfunction/Azure.ResourceManager.NetworkFunction/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/networkfunction/ci.mgmt.yml + - sdk/networkfunction/Azure.ResourceManager.NetworkFunction/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/newrelicobservability/ci.mgmt.yml b/sdk/newrelicobservability/ci.mgmt.yml index d01ef74cd7499..599cfd845f2ce 100644 --- a/sdk/newrelicobservability/ci.mgmt.yml +++ b/sdk/newrelicobservability/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/newrelicobservability/ci.mgmt.yml - sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/newrelicobservability/ci.mgmt.yml + - sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/nginx/ci.mgmt.yml b/sdk/nginx/ci.mgmt.yml index f701b26a561ac..39e047ce00157 100644 --- a/sdk/nginx/ci.mgmt.yml +++ b/sdk/nginx/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/nginx/ci.mgmt.yml - sdk/nginx/Azure.ResourceManager.Nginx/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/nginx/ci.mgmt.yml + - sdk/nginx/Azure.ResourceManager.Nginx/ + extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/notificationhubs/ci.mgmt.yml b/sdk/notificationhubs/ci.mgmt.yml index ba5a26631dd42..8d9f15f7758ba 100644 --- a/sdk/notificationhubs/ci.mgmt.yml +++ b/sdk/notificationhubs/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/notificationhubs/ci.mgmt.yml - sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/notificationhubs/ci.mgmt.yml + - sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/openenergyplatform/ci.mgmt.yml b/sdk/openenergyplatform/ci.mgmt.yml index 1ab74128b4db7..f2394b80f6b9a 100644 --- a/sdk/openenergyplatform/ci.mgmt.yml +++ b/sdk/openenergyplatform/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/openenergyplatform/ci.mgmt.yml - sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/openenergyplatform/ci.mgmt.yml + - sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/ + extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/operationalinsights/ci.mgmt.yml b/sdk/operationalinsights/ci.mgmt.yml index d4c3b61dac40b..9e588305c9016 100644 --- a/sdk/operationalinsights/ci.mgmt.yml +++ b/sdk/operationalinsights/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/operationalinsights/ci.mgmt.yml - sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/operationalinsights/ci.mgmt.yml + - sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/oracle/ci.mgmt.yml b/sdk/oracle/ci.mgmt.yml index ccbd7c096ecf8..760950dbd58a6 100644 --- a/sdk/oracle/ci.mgmt.yml +++ b/sdk/oracle/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/oracle/ci.mgmt.yml - sdk/oracle/Azure.ResourceManager.OracleDatabase/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/oracle/ci.mgmt.yml + - sdk/oracle/Azure.ResourceManager.OracleDatabase/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/orbital/ci.mgmt.yml b/sdk/orbital/ci.mgmt.yml index 701576d2fa625..2b2102df1da35 100644 --- a/sdk/orbital/ci.mgmt.yml +++ b/sdk/orbital/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/orbital/ci.mgmt.yml - sdk/orbital/Azure.ResourceManager.Orbital/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/orbital/ci.mgmt.yml + - sdk/orbital/Azure.ResourceManager.Orbital/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/paloaltonetworks.ngfw/ci.mgmt.yml b/sdk/paloaltonetworks.ngfw/ci.mgmt.yml index 77dca48de9ef9..6348d3109683b 100644 --- a/sdk/paloaltonetworks.ngfw/ci.mgmt.yml +++ b/sdk/paloaltonetworks.ngfw/ci.mgmt.yml @@ -1,4 +1,5 @@ trigger: none + pr: branches: include: @@ -11,6 +12,18 @@ pr: - sdk/paloaltonetworks.ngfw/ci.mgmt.yml - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/paloaltonetworks.ngfw/ci.mgmt.yml + - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/peering/ci.mgmt.yml b/sdk/peering/ci.mgmt.yml index 4d3d67e739490..cfef409531ee0 100644 --- a/sdk/peering/ci.mgmt.yml +++ b/sdk/peering/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/peering/ci.mgmt.yml - sdk/peering/Azure.ResourceManager.Peering/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/peering/ci.mgmt.yml + - sdk/peering/Azure.ResourceManager.Peering/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/Azure.Developer.MicrosoftPlaywrightTesting.sln b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/Azure.Developer.MicrosoftPlaywrightTesting.sln new file mode 100644 index 0000000000000..f0b95cc94a15c --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/Azure.Developer.MicrosoftPlaywrightTesting.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.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{ECC730C1-4AEA-420C-916A-66B19B79E4DC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Developer.MicrosoftPlaywrightTesting", "src\Azure.Developer.MicrosoftPlaywrightTesting.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Developer.MicrosoftPlaywrightTesting.Tests", "tests\Azure.Developer.MicrosoftPlaywrightTesting.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 + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.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/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/CHANGELOG.md b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/CHANGELOG.md new file mode 100644 index 0000000000000..13dd08af78abe --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/Directory.Build.props b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/Directory.Build.props new file mode 100644 index 0000000000000..63bd836ad44b7 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/README.md b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/README.md new file mode 100644 index 0000000000000..dcf87d94cdf2b --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/README.md @@ -0,0 +1,107 @@ +# Azure.Developer.MicrosoftPlaywrightTesting client library for .NET + +Azure.Developer.MicrosoftPlaywrightTesting is a managed service that helps developers get secret simply and securely. + +Use the client library for to: + +* [Get secret](https://docs.microsoft.com/azure) + +[Source code][source_root] | [Package (NuGet)][package] | [API reference documentation][reference_docs] | [Product documentation][azconfig_docs] | [Samples][source_samples] + + [Source code](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src) | [Package (NuGet)](https://www.nuget.org/packages) | [API reference documentation](https://azure.github.io/azure-sdk-for-net) | [Product documentation](https://docs.microsoft.com/azure) + +## Getting started + +This section should include everything a developer needs to do to install and create their first client connection *very quickly*. + +### Install the package + +First, provide instruction for obtaining and installing the package or library. This section might include only a single line of code, like `dotnet add package package-name`, but should enable a developer to successfully install the package from NuGet, npm, or even cloning a GitHub repository. + +Install the client library for .NET with [NuGet](https://www.nuget.org/ ): + +```dotnetcli +dotnet add package Azure.Developer.MicrosoftPlaywrightTesting --prerelease +``` + +### Prerequisites + +Include a section after the install command that details any requirements that must be satisfied before a developer can [authenticate](#authenticate-the-client) and test all of the snippets in the [Examples](#examples) section. For example, for Cosmos DB: + +> You must have an [Azure subscription](https://azure.microsoft.com/free/dotnet/) and [Cosmos DB account](https://docs.microsoft.com/azure/cosmos-db/account-overview) (SQL API). In order to take advantage of the C# 8.0 syntax, it is recommended that you compile using the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher with a [language version](https://docs.microsoft.com/dotnet/csharp/language-reference/configure-language-version#override-a-default) of `latest`. It is also possible to compile with the .NET Core SDK 2.1.x using a language version of `preview`. + +### Authenticate the client + +If your library requires authentication for use, such as for Azure services, include instructions and example code needed for initializing and authenticating. + +For example, include details on obtaining an account key and endpoint URI, setting environment variables for each, and initializing the client object. + +### Service API versions + +The client library targets the latest service API version by default. A client instance accepts an optional service API version parameter from its options to specify which API version service to communicate. + +#### Select a service API version + +You have the flexibility to explicitly select a supported service API version when instantiating a client by configuring its associated options. This ensures that the client can communicate with services using the specified API version. + +For example, + +```C# Snippet:CreateClientForSpecificApiVersion +Uri endpoint = new Uri(""); +DefaultAzureCredential credential = new DefaultAzureCredential(); +ClientOptions options = new ClientOptions(ClientOptions.ServiceVersion.) +var client = new Client(endpoint, credential, options); +``` + +When selecting an API version, it's important to verify that there are no breaking changes compared to the latest API version. If there are significant differences, API calls may fail due to incompatibility. + +Always ensure that the chosen API version is fully supported and operational for your specific use case and that it aligns with the service's versioning policy. + +## Key concepts + +The *Key concepts* section should describe the functionality of the main classes. Point out the most important and useful classes in the package (with links to their reference pages) and explain how those classes work together. Feel free to use bulleted lists, tables, code blocks, or even diagrams for clarity. + +Include the *Thread safety* and *Additional concepts* sections below at the end of your *Key concepts* section. You may remove or add links depending on what your library makes use of: + +### Thread safety + +We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads. + +### Additional concepts + +[Client options](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#configuring-service-clients-using-clientoptions) | +[Accessing the response](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#accessing-http-response-details-using-responset) | +[Long-running operations](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#consuming-long-running-operations-using-operationt) | +[Handling failures](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#reporting-errors-requestfailedexception) | +[Diagnostics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md) | +[Mocking](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#mocking) | +[Client lifetime](https://devblogs.microsoft.com/azure-sdk/lifetime-management-and-thread-safety-guarantees-of-azure-sdk-net-clients/) + + +## Examples + +You can familiarize yourself with different APIs using [Samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/samples). + +## Troubleshooting + +Describe common errors and exceptions, how to "unpack" them if necessary, and include guidance for graceful handling and recovery. + +Provide information to help developers avoid throttling or other service-enforced errors they might encounter. For example, provide guidance and examples for using retry or connection policies in the API. + +If the package or a related package supports it, include tips for logging or enabling instrumentation to help them debug their code. + +## Next steps + +* Provide a link to additional code examples, ideally to those sitting alongside the README in the package's `/samples` directory. +* If appropriate, point users to other packages that might be useful. +* If you think there's a good chance that developers might stumble across your package in error (because they're searching for specific functionality and mistakenly think the package provides that functionality), point them to the packages they might be looking for. + +## Contributing + +This is a template, but your SDK readme should include details on how to contribute code to the repo/package. + + +[style-guide-msft]: https://docs.microsoft.com/style-guide/capitalization +[style-guide-cloud]: https://aka.ms/azsdk/cloud-style-guide + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/README.png) diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Azure.Developer.MicrosoftPlaywrightTesting.csproj b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Azure.Developer.MicrosoftPlaywrightTesting.csproj new file mode 100644 index 0000000000000..4a68b892e00d5 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Azure.Developer.MicrosoftPlaywrightTesting.csproj @@ -0,0 +1,19 @@ + + + This is the Azure.Developer.MicrosoftPlaywrightTesting client library for developing .NET applications with rich experience. + Azure SDK Code Generation Azure.Developer.MicrosoftPlaywrightTesting for Azure Data Plane + 1.0.0-beta.1 + Azure.Developer.MicrosoftPlaywrightTesting + $(RequiredTargetFrameworks) + true + + + + + + + + + + + diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessToken.Serialization.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessToken.Serialization.cs new file mode 100644 index 0000000000000..2916dd2e3f669 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessToken.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.Developer.MicrosoftPlaywrightTesting +{ + public partial class AccessToken : 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(AccessToken)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (options.Format != "W" && Optional.IsDefined(JwtToken)) + { + writer.WritePropertyName("jwtToken"u8); + writer.WriteStringValue(JwtToken); + } + if (options.Format != "W") + { + writer.WritePropertyName("createdAt"u8); + writer.WriteStringValue(CreatedAt, "O"); + } + writer.WritePropertyName("expiryAt"u8); + writer.WriteStringValue(ExpiryAt, "O"); + if (options.Format != "W") + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AccessToken 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(AccessToken)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAccessToken(document.RootElement, options); + } + + internal static AccessToken DeserializeAccessToken(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Guid id = default; + string name = default; + string jwtToken = default; + DateTimeOffset createdAt = default; + DateTimeOffset expiryAt = default; + AccessTokenState state = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("jwtToken"u8)) + { + jwtToken = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdAt"u8)) + { + createdAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("expiryAt"u8)) + { + expiryAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("state"u8)) + { + state = new AccessTokenState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AccessToken( + id, + name, + jwtToken, + createdAt, + expiryAt, + state, + 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(AccessToken)} does not support writing '{options.Format}' format."); + } + } + + AccessToken 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); + return DeserializeAccessToken(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AccessToken)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AccessToken FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAccessToken(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessToken.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessToken.cs new file mode 100644 index 0000000000000..f681c953a6892 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessToken.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.Developer.MicrosoftPlaywrightTesting +{ + /// Model of an access-token linked to an account. + public partial class AccessToken + { + /// + /// 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 access-token name. + /// The access-token expiryAt utcDateTime. + /// is null. + public AccessToken(string name, DateTimeOffset expiryAt) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + ExpiryAt = expiryAt; + } + + /// Initializes a new instance of . + /// The access-token id. + /// The access-token name. + /// The access-token value in JWT format. + /// The access-token createdAt utcDateTime. + /// The access-token expiryAt utcDateTime. + /// The access-token state - Active | Expired. + /// Keeps track of any properties unknown to the library. + internal AccessToken(Guid id, string name, string jwtToken, DateTimeOffset createdAt, DateTimeOffset expiryAt, AccessTokenState state, IDictionary serializedAdditionalRawData) + { + Id = id; + Name = name; + JwtToken = jwtToken; + CreatedAt = createdAt; + ExpiryAt = expiryAt; + State = state; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AccessToken() + { + } + + /// The access-token id. + public Guid Id { get; } + /// The access-token name. + public string Name { get; set; } + /// The access-token value in JWT format. + public string JwtToken { get; } + /// The access-token createdAt utcDateTime. + public DateTimeOffset CreatedAt { get; } + /// The access-token expiryAt utcDateTime. + public DateTimeOffset ExpiryAt { get; set; } + /// The access-token state - Active | Expired. + public AccessTokenState State { get; } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessTokenState.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessTokenState.cs new file mode 100644 index 0000000000000..f321e87331801 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessTokenState.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.Developer.MicrosoftPlaywrightTesting +{ + /// The access-token state. + public readonly partial struct AccessTokenState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AccessTokenState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "Active"; + private const string ExpiredValue = "Expired"; + + /// The access-token is Active. + public static AccessTokenState Active { get; } = new AccessTokenState(ActiveValue); + /// The access-token is Expired. + public static AccessTokenState Expired { get; } = new AccessTokenState(ExpiredValue); + /// Determines if two values are the same. + public static bool operator ==(AccessTokenState left, AccessTokenState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AccessTokenState left, AccessTokenState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AccessTokenState(string value) => new AccessTokenState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AccessTokenState other && Equals(other); + /// + public bool Equals(AccessTokenState 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/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessTokens.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessTokens.cs new file mode 100644 index 0000000000000..c419c9786a4e2 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccessTokens.cs @@ -0,0 +1,650 @@ +// 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; + +namespace Azure.Developer.MicrosoftPlaywrightTesting +{ + // Data plane generated sub-client. + /// The AccessTokens sub-client. + public partial class AccessTokens + { + private static readonly string[] AuthorizationScopes = new string[] { "https://playwright.microsoft.com/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of AccessTokens for mocking. + protected AccessTokens() + { + } + + /// Initializes a new instance of AccessTokens. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// + /// Supported Azure Playwright Service API Endpoints (protocol and hostname, for example: + /// https://{region}.api.playwright.microsoft.com). + /// + /// The API version to use for this operation. + internal AccessTokens(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// Creates an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + /// The account id. + /// The access-token id. + /// The resource instance. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> CreateOrReplaceAsync(string accountId, Guid accessTokenId, AccessToken resource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + Argument.AssertNotNull(resource, nameof(resource)); + + using RequestContent content = resource.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CreateOrReplaceAsync(accountId, accessTokenId, content, context).ConfigureAwait(false); + return Response.FromValue(AccessToken.FromResponse(response), response); + } + + /// Creates an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + /// The account id. + /// The access-token id. + /// The resource instance. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response CreateOrReplace(string accountId, Guid accessTokenId, AccessToken resource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + Argument.AssertNotNull(resource, nameof(resource)); + + using RequestContent content = resource.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CreateOrReplace(accountId, accessTokenId, content, context); + return Response.FromValue(AccessToken.FromResponse(response), response); + } + + /// + /// [Protocol Method] Creates an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The account id. + /// The access-token id. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateOrReplaceAsync(string accountId, Guid accessTokenId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AccessTokens.CreateOrReplace"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrReplaceRequest(accountId, accessTokenId, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The account id. + /// The access-token id. + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreateOrReplace(string accountId, Guid accessTokenId, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("AccessTokens.CreateOrReplace"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrReplaceRequest(accountId, accessTokenId, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + /// The account id. + /// The access-token id. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetAccessTokenAsync(string accountId, Guid accessTokenId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetAccessTokenAsync(accountId, accessTokenId, context).ConfigureAwait(false); + return Response.FromValue(AccessToken.FromResponse(response), response); + } + + /// Gets an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + /// The account id. + /// The access-token id. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetAccessToken(string accountId, Guid accessTokenId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetAccessToken(accountId, accessTokenId, context); + return Response.FromValue(AccessToken.FromResponse(response), response); + } + + /// + /// [Protocol Method] Gets an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The account id. + /// The access-token id. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetAccessTokenAsync(string accountId, Guid accessTokenId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + using var scope = ClientDiagnostics.CreateScope("AccessTokens.GetAccessToken"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAccessTokenRequest(accountId, accessTokenId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The account id. + /// The access-token id. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetAccessToken(string accountId, Guid accessTokenId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + using var scope = ClientDiagnostics.CreateScope("AccessTokens.GetAccessToken"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAccessTokenRequest(accountId, accessTokenId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The account id. + /// The access-token id. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task DeleteAsync(string accountId, Guid accessTokenId, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + using var scope = ClientDiagnostics.CreateScope("AccessTokens.Delete"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteRequest(accountId, accessTokenId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes an access-token for the account with given access-token id. Authorization required is Bearer JWT Access token provided by EntraID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The account id. + /// The access-token id. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Delete(string accountId, Guid accessTokenId, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + using var scope = ClientDiagnostics.CreateScope("AccessTokens.Delete"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteRequest(accountId, accessTokenId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Validates access-token provided in authorization header for the given account id. Authorization required is Bearer JWT Access token provided by MPT service. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The account id. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task ValidateAsync(string accountId, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + using var scope = ClientDiagnostics.CreateScope("AccessTokens.Validate"); + scope.Start(); + try + { + using HttpMessage message = CreateValidateRequest(accountId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Validates access-token provided in authorization header for the given account id. Authorization required is Bearer JWT Access token provided by MPT service. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The account id. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Validate(string accountId, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + using var scope = ClientDiagnostics.CreateScope("AccessTokens.Validate"); + scope.Start(); + try + { + using HttpMessage message = CreateValidateRequest(accountId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists access-tokens for the given account id. Authorization required is Bearer JWT Access token provided by EntraID. + /// The account id. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetAccessTokensAsync(string accountId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAccessTokensRequest(accountId, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAccessTokensNextPageRequest(nextLink, accountId, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => AccessToken.DeserializeAccessToken(e), ClientDiagnostics, _pipeline, "AccessTokens.GetAccessTokens", "value", "nextLink", context); + } + + /// Lists access-tokens for the given account id. Authorization required is Bearer JWT Access token provided by EntraID. + /// The account id. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetAccessTokens(string accountId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAccessTokensRequest(accountId, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAccessTokensNextPageRequest(nextLink, accountId, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => AccessToken.DeserializeAccessToken(e), ClientDiagnostics, _pipeline, "AccessTokens.GetAccessTokens", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists access-tokens for the given account id. Authorization required is Bearer JWT Access token provided by EntraID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The account id. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetAccessTokensAsync(string accountId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAccessTokensRequest(accountId, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAccessTokensNextPageRequest(nextLink, accountId, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AccessTokens.GetAccessTokens", "value", "nextLink", context); + } + + /// + /// [Protocol Method] Lists access-tokens for the given account id. Authorization required is Bearer JWT Access token provided by EntraID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The account id. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetAccessTokens(string accountId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAccessTokensRequest(accountId, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetAccessTokensNextPageRequest(nextLink, accountId, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "AccessTokens.GetAccessTokens", "value", "nextLink", context); + } + + internal HttpMessage CreateCreateOrReplaceRequest(string accountId, Guid accessTokenId, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200201); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/accounts/", false); + uri.AppendPath(accountId, true); + uri.AppendPath("/access-tokens/", false); + uri.AppendPath(accessTokenId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetAccessTokenRequest(string accountId, Guid accessTokenId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/accounts/", false); + uri.AppendPath(accountId, true); + uri.AppendPath("/access-tokens/", false); + uri.AppendPath(accessTokenId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeleteRequest(string accountId, Guid accessTokenId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/accounts/", false); + uri.AppendPath(accountId, true); + uri.AppendPath("/access-tokens/", false); + uri.AppendPath(accessTokenId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetAccessTokensRequest(string accountId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/accounts/", false); + uri.AppendPath(accountId, true); + uri.AppendPath("/access-tokens", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateValidateRequest(string accountId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/accounts/", false); + uri.AppendPath(accountId, true); + uri.AppendPath("/access-tokens/validate", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetAccessTokensNextPageRequest(string nextLink, string accountId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + 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"); + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200201; + private static ResponseClassifier ResponseClassifier200201 => _responseClassifier200201 ??= new StatusCodeClassifier(stackalloc ushort[] { 200, 201 }); + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier204; + private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 }); + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Account.Serialization.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Account.Serialization.cs new file mode 100644 index 0000000000000..cc2c94d0ee3d9 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Account.Serialization.cs @@ -0,0 +1,295 @@ +// 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.Developer.MicrosoftPlaywrightTesting +{ + public partial class Account : 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(Account)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.ToString()); + } + if (options.Format != "W") + { + writer.WritePropertyName("subscriptionId"u8); + writer.WriteStringValue(SubscriptionId); + } + if (options.Format != "W") + { + writer.WritePropertyName("subscriptionState"u8); + writer.WriteStringValue(SubscriptionState.ToString()); + } + if (options.Format != "W") + { + writer.WritePropertyName("tenantId"u8); + writer.WriteStringValue(TenantId); + } + if (options.Format != "W") + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location); + } + if (options.Format != "W" && Optional.IsDefined(RegionalAffinity)) + { + writer.WritePropertyName("regionalAffinity"u8); + writer.WriteStringValue(RegionalAffinity.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ScalableExecution)) + { + writer.WritePropertyName("scalableExecution"u8); + writer.WriteStringValue(ScalableExecution.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Reporting)) + { + writer.WritePropertyName("reporting"u8); + writer.WriteStringValue(Reporting.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(LocalAuth)) + { + writer.WritePropertyName("localAuth"u8); + writer.WriteStringValue(LocalAuth.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + Account 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(Account)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAccount(document.RootElement, options); + } + + internal static Account DeserializeAccount(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string resourceId = default; + string name = default; + AccountState state = default; + Guid subscriptionId = default; + SubscriptionState subscriptionState = default; + Guid tenantId = default; + string location = default; + EnablementStatus? regionalAffinity = default; + EnablementStatus? scalableExecution = default; + EnablementStatus? reporting = default; + EnablementStatus? localAuth = 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("resourceId"u8)) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + state = new AccountState(property.Value.GetString()); + continue; + } + if (property.NameEquals("subscriptionId"u8)) + { + subscriptionId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("subscriptionState"u8)) + { + subscriptionState = new SubscriptionState(property.Value.GetString()); + continue; + } + if (property.NameEquals("tenantId"u8)) + { + tenantId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("location"u8)) + { + location = property.Value.GetString(); + continue; + } + if (property.NameEquals("regionalAffinity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + regionalAffinity = new EnablementStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("scalableExecution"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scalableExecution = new EnablementStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("reporting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + reporting = new EnablementStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("localAuth"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localAuth = new EnablementStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new Account( + id, + resourceId, + name, + state, + subscriptionId, + subscriptionState, + tenantId, + location, + regionalAffinity, + scalableExecution, + reporting, + localAuth, + 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(Account)} does not support writing '{options.Format}' format."); + } + } + + Account 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); + return DeserializeAccount(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Account)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static Account FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeAccount(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Account.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Account.cs new file mode 100644 index 0000000000000..be4afd6848bbb --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Account.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; + +namespace Azure.Developer.MicrosoftPlaywrightTesting +{ + /// An account is a parent resource for most of the other service resources. It's directly mapped to an Azure resource. + public partial class Account + { + /// + /// 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 Account() + { + } + + /// Initializes a new instance of . + /// The account id. + /// The fully-qualified Azure resource id for the account. + /// The account name. + /// The state of account - Active | Inactive. + /// The Azure subscription id for the account. + /// The Azure subscription state - Registered | Unregistered | Warned | Suspended | Deleted. + /// The Azure tenant id of the account. + /// The account resource location in Azure, for eg. eastus, southeastasia. + /// This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. + /// When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. + /// When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. + /// When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations. + /// Keeps track of any properties unknown to the library. + internal Account(string id, string resourceId, string name, AccountState state, Guid subscriptionId, SubscriptionState subscriptionState, Guid tenantId, string location, EnablementStatus? regionalAffinity, EnablementStatus? scalableExecution, EnablementStatus? reporting, EnablementStatus? localAuth, IDictionary serializedAdditionalRawData) + { + Id = id; + ResourceId = resourceId; + Name = name; + State = state; + SubscriptionId = subscriptionId; + SubscriptionState = subscriptionState; + TenantId = tenantId; + Location = location; + RegionalAffinity = regionalAffinity; + ScalableExecution = scalableExecution; + Reporting = reporting; + LocalAuth = localAuth; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The account id. + public string Id { get; } + /// The fully-qualified Azure resource id for the account. + public string ResourceId { get; } + /// The account name. + public string Name { get; } + /// The state of account - Active | Inactive. + public AccountState State { get; } + /// The Azure subscription id for the account. + public Guid SubscriptionId { get; } + /// The Azure subscription state - Registered | Unregistered | Warned | Suspended | Deleted. + public SubscriptionState SubscriptionState { get; } + /// The Azure tenant id of the account. + public Guid TenantId { get; } + /// The account resource location in Azure, for eg. eastus, southeastasia. + public string Location { get; } + /// This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. + public EnablementStatus? RegionalAffinity { get; } + /// When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. + public EnablementStatus? ScalableExecution { get; } + /// When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. + public EnablementStatus? Reporting { get; } + /// When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations. + public EnablementStatus? LocalAuth { get; } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccountState.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccountState.cs new file mode 100644 index 0000000000000..bac66ed7f0e2e --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AccountState.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.Developer.MicrosoftPlaywrightTesting +{ + /// The account state. + public readonly partial struct AccountState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AccountState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "Active"; + private const string InactiveValue = "Inactive"; + + /// The account is Active. + public static AccountState Active { get; } = new AccountState(ActiveValue); + /// The account is Inactive. + public static AccountState Inactive { get; } = new AccountState(InactiveValue); + /// Determines if two values are the same. + public static bool operator ==(AccountState left, AccountState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AccountState left, AccountState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AccountState(string value) => new AccountState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AccountState other && Equals(other); + /// + public bool Equals(AccountState 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/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Accounts.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Accounts.cs new file mode 100644 index 0000000000000..86e1f3026e1b6 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Accounts.cs @@ -0,0 +1,340 @@ +// 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.Core.Pipeline; + +namespace Azure.Developer.MicrosoftPlaywrightTesting +{ + // Data plane generated sub-client. + /// The Accounts sub-client. + public partial class Accounts + { + private static readonly string[] AuthorizationScopes = new string[] { "https://playwright.microsoft.com/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of Accounts for mocking. + protected Accounts() + { + } + + /// Initializes a new instance of Accounts. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// + /// Supported Azure Playwright Service API Endpoints (protocol and hostname, for example: + /// https://{region}.api.playwright.microsoft.com). + /// + /// The API version to use for this operation. + internal Accounts(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// Get details of the Azure resource mapped to an account for the given accountId. Authorization required is Bearer JWT Access token provided by EntraID. + /// The account id. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetAccountAsync(string accountId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetAccountAsync(accountId, context).ConfigureAwait(false); + return Response.FromValue(Account.FromResponse(response), response); + } + + /// Get details of the Azure resource mapped to an account for the given accountId. Authorization required is Bearer JWT Access token provided by EntraID. + /// The account id. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetAccount(string accountId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetAccount(accountId, context); + return Response.FromValue(Account.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get details of the Azure resource mapped to an account for the given accountId. Authorization required is Bearer JWT Access token provided by EntraID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The account id. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetAccountAsync(string accountId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + using var scope = ClientDiagnostics.CreateScope("Accounts.GetAccount"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAccountRequest(accountId, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get details of the Azure resource mapped to an account for the given accountId. Authorization required is Bearer JWT Access token provided by EntraID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The account id. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetAccount(string accountId, RequestContext context) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + using var scope = ClientDiagnostics.CreateScope("Accounts.GetAccount"); + scope.Start(); + try + { + using HttpMessage message = CreateGetAccountRequest(accountId, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Gets remote browsers corresponding to given accountId and redirects the client for running MPT tests. Authorization required is Bearer JWT Access token provided by EntraID or MPT Service. + /// The account id. + /// The run id provided by client for corresponding remote test run. + /// The os provided by client for remote test runs. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task GetBrowsersAsync(string accountId, string runId = null, OS? os = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetBrowsersAsync(accountId, runId, os?.ToString(), context).ConfigureAwait(false); + return response; + } + + /// Gets remote browsers corresponding to given accountId and redirects the client for running MPT tests. Authorization required is Bearer JWT Access token provided by EntraID or MPT Service. + /// The account id. + /// The run id provided by client for corresponding remote test run. + /// The os provided by client for remote test runs. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetBrowsers(string accountId, string runId = null, OS? os = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetBrowsers(accountId, runId, os?.ToString(), context); + return response; + } + + /// + /// [Protocol Method] Gets remote browsers corresponding to given accountId and redirects the client for running MPT tests. Authorization required is Bearer JWT Access token provided by EntraID or MPT Service. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The account id. + /// The run id provided by client for corresponding remote test run. + /// The os provided by client for remote test runs. Allowed values: "linux" | "windows". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task GetBrowsersAsync(string accountId, string runId, string os, RequestContext context) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + using var scope = ClientDiagnostics.CreateScope("Accounts.GetBrowsers"); + scope.Start(); + try + { + using HttpMessage message = CreateGetBrowsersRequest(accountId, runId, os, context); + RedirectPolicy.SetAllowAutoRedirect(message, true); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Gets remote browsers corresponding to given accountId and redirects the client for running MPT tests. Authorization required is Bearer JWT Access token provided by EntraID or MPT Service. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The account id. + /// The run id provided by client for corresponding remote test run. + /// The os provided by client for remote test runs. Allowed values: "linux" | "windows". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response GetBrowsers(string accountId, string runId, string os, RequestContext context) + { + Argument.AssertNotNullOrEmpty(accountId, nameof(accountId)); + + using var scope = ClientDiagnostics.CreateScope("Accounts.GetBrowsers"); + scope.Start(); + try + { + using HttpMessage message = CreateGetBrowsersRequest(accountId, runId, os, context); + RedirectPolicy.SetAllowAutoRedirect(message, true); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + internal HttpMessage CreateGetAccountRequest(string accountId, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/accounts/", false); + uri.AppendPath(accountId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetBrowsersRequest(string accountId, string runId, string os, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier302); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/accounts/", false); + uri.AppendPath(accountId, true); + uri.AppendPath("/browsers", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (runId != null) + { + uri.AppendQuery("runId", runId, true); + } + if (os != null) + { + uri.AppendQuery("os", os, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier302; + private static ResponseClassifier ResponseClassifier302 => _responseClassifier302 ??= new StatusCodeClassifier(stackalloc ushort[] { 302 }); + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AuthManagerClient.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AuthManagerClient.cs new file mode 100644 index 0000000000000..aeae0a5f32755 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AuthManagerClient.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.Developer.MicrosoftPlaywrightTesting +{ + // Data plane generated client. + /// The AuthManager service client. + public partial class AuthManagerClient + { + private static readonly string[] AuthorizationScopes = new string[] { "https://playwright.microsoft.com/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of AuthManagerClient for mocking. + protected AuthManagerClient() + { + } + + /// Initializes a new instance of AuthManagerClient. + /// + /// Supported Azure Playwright Service API Endpoints (protocol and hostname, for example: + /// https://{region}.api.playwright.microsoft.com). + /// + /// A credential used to authenticate to an Azure Service. + /// or is null. + public AuthManagerClient(Uri endpoint, TokenCredential credential) : this(endpoint, credential, new AuthManagerClientOptions()) + { + } + + /// Initializes a new instance of AuthManagerClient. + /// + /// Supported Azure Playwright Service API Endpoints (protocol and hostname, for example: + /// https://{region}.api.playwright.microsoft.com). + /// + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public AuthManagerClient(Uri endpoint, TokenCredential credential, AuthManagerClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new AuthManagerClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _tokenCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); + _endpoint = endpoint; + } + + /// Initializes a new instance of AccessTokens. + /// The API version to use for this operation. + /// is null. + public virtual AccessTokens GetAccessTokensClient(string apiVersion = "2024-12-01") + { + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + + return new AccessTokens(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, apiVersion); + } + + /// Initializes a new instance of Accounts. + /// The API version to use for this operation. + /// is null. + public virtual Accounts GetAccountsClient(string apiVersion = "2024-12-01") + { + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + + return new Accounts(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, apiVersion); + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AuthManagerClientOptions.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AuthManagerClientOptions.cs new file mode 100644 index 0000000000000..99fd673ddfd43 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/AuthManagerClientOptions.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Developer.MicrosoftPlaywrightTesting +{ + /// Client options for AuthManagerClient. + public partial class AuthManagerClientOptions : ClientOptions + { + private const ServiceVersion LatestVersion = ServiceVersion.V2024_12_01; + + /// The version of the service to use. + public enum ServiceVersion + { + /// Service version "2024-12-01". + V2024_12_01 = 1, + } + + internal string Version { get; } + + /// Initializes new instance of AuthManagerClientOptions. + public AuthManagerClientOptions(ServiceVersion version = LatestVersion) + { + Version = version switch + { + ServiceVersion.V2024_12_01 => "2024-12-01", + _ => throw new NotSupportedException() + }; + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/DeveloperMicrosoftPlaywrightTestingClientBuilderExtensions.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/DeveloperMicrosoftPlaywrightTestingClientBuilderExtensions.cs new file mode 100644 index 0000000000000..364126f7a80cc --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/DeveloperMicrosoftPlaywrightTestingClientBuilderExtensions.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core.Extensions; +using Azure.Developer.MicrosoftPlaywrightTesting; + +namespace Microsoft.Extensions.Azure +{ + /// Extension methods to add to client builder. + public static partial class DeveloperMicrosoftPlaywrightTestingClientBuilderExtensions + { + /// Registers a instance. + /// The builder to register with. + /// + /// Supported Azure Playwright Service API Endpoints (protocol and hostname, for example: + /// https://{region}.api.playwright.microsoft.com). + /// + public static IAzureClientBuilder AddAuthManagerClient(this TBuilder builder, Uri endpoint) + where TBuilder : IAzureClientFactoryBuilderWithCredential + { + return builder.RegisterClientFactory((options, cred) => new AuthManagerClient(endpoint, cred, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// The configuration values. + public static IAzureClientBuilder AddAuthManagerClient(this TBuilder builder, TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration + { + return builder.RegisterClientFactory(configuration); + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/DeveloperMicrosoftPlaywrightTestingModelFactory.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/DeveloperMicrosoftPlaywrightTestingModelFactory.cs new file mode 100644 index 0000000000000..91a05b3a71000 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/DeveloperMicrosoftPlaywrightTestingModelFactory.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Developer.MicrosoftPlaywrightTesting +{ + /// Model factory for models. + public static partial class DeveloperMicrosoftPlaywrightTestingModelFactory + { + /// Initializes a new instance of . + /// The account id. + /// The fully-qualified Azure resource id for the account. + /// The account name. + /// The state of account - Active | Inactive. + /// The Azure subscription id for the account. + /// The Azure subscription state - Registered | Unregistered | Warned | Suspended | Deleted. + /// The Azure tenant id of the account. + /// The account resource location in Azure, for eg. eastus, southeastasia. + /// This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. + /// When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. + /// When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. + /// When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations. + /// A new instance for mocking. + public static Account Account(string id = null, string resourceId = null, string name = null, AccountState state = default, Guid subscriptionId = default, SubscriptionState subscriptionState = default, Guid tenantId = default, string location = null, EnablementStatus? regionalAffinity = null, EnablementStatus? scalableExecution = null, EnablementStatus? reporting = null, EnablementStatus? localAuth = null) + { + return new Account( + id, + resourceId, + name, + state, + subscriptionId, + subscriptionState, + tenantId, + location, + regionalAffinity, + scalableExecution, + reporting, + localAuth, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The access-token id. + /// The access-token name. + /// The access-token value in JWT format. + /// The access-token createdAt utcDateTime. + /// The access-token expiryAt utcDateTime. + /// The access-token state - Active | Expired. + /// A new instance for mocking. + public static AccessToken AccessToken(Guid id = default, string name = null, string jwtToken = null, DateTimeOffset createdAt = default, DateTimeOffset expiryAt = default, AccessTokenState state = default) + { + return new AccessToken( + id, + name, + jwtToken, + createdAt, + expiryAt, + state, + serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Docs/AccessTokens.xml b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Docs/AccessTokens.xml new file mode 100644 index 0000000000000..d643f84d15d46 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Docs/AccessTokens.xml @@ -0,0 +1,251 @@ + + + + + +This sample shows how to call CreateOrReplaceAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +AccessToken resource = new AccessToken("sampleAccessToken", DateTimeOffset.Parse("2022-09-28T12:32:33Z")); +Response response = await client.CreateOrReplaceAsync("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), resource); +]]> + + + +This sample shows how to call CreateOrReplace. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +AccessToken resource = new AccessToken("sampleAccessToken", DateTimeOffset.Parse("2022-09-28T12:32:33Z")); +Response response = client.CreateOrReplace("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), resource); +]]> + + + +This sample shows how to call CreateOrReplaceAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +using RequestContent content = RequestContent.Create(new +{ + id = "00000000-0000-0000-0000-000000000000", + name = "sampleAccessToken", + expiryAt = "2022-09-28T12:32:33Z", +}); +Response response = await client.CreateOrReplaceAsync("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("createdAt").ToString()); +Console.WriteLine(result.GetProperty("expiryAt").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +]]> + + + +This sample shows how to call CreateOrReplace and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +using RequestContent content = RequestContent.Create(new +{ + id = "00000000-0000-0000-0000-000000000000", + name = "sampleAccessToken", + expiryAt = "2022-09-28T12:32:33Z", +}); +Response response = client.CreateOrReplace("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("createdAt").ToString()); +Console.WriteLine(result.GetProperty("expiryAt").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +]]> + + + +This sample shows how to call GetAccessTokenAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +Response response = await client.GetAccessTokenAsync("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000")); +]]> + + + +This sample shows how to call GetAccessToken. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +Response response = client.GetAccessToken("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000")); +]]> + + + +This sample shows how to call GetAccessTokenAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +Response response = await client.GetAccessTokenAsync("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("createdAt").ToString()); +Console.WriteLine(result.GetProperty("expiryAt").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +]]> + + + +This sample shows how to call GetAccessToken and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +Response response = client.GetAccessToken("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("createdAt").ToString()); +Console.WriteLine(result.GetProperty("expiryAt").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +]]> + + + +This sample shows how to call DeleteAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +Response response = await client.DeleteAsync("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call Delete. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +Response response = client.Delete("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000")); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call ValidateAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +Response response = await client.ValidateAsync("sampleAccountId"); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call Validate. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +Response response = client.Validate("sampleAccountId"); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetAccessTokensAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +await foreach (AccessToken item in client.GetAccessTokensAsync("sampleAccountId")) +{ +} +]]> + + + +This sample shows how to call GetAccessTokens. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +foreach (AccessToken item in client.GetAccessTokens("sampleAccountId")) +{ +} +]]> + + + +This sample shows how to call GetAccessTokensAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +await foreach (BinaryData item in client.GetAccessTokensAsync("sampleAccountId", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("expiryAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); +} +]]> + + + +This sample shows how to call GetAccessTokens and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + +foreach (BinaryData item in client.GetAccessTokens("sampleAccountId", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("expiryAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); +} +]]> + + + \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Docs/Accounts.xml b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Docs/Accounts.xml new file mode 100644 index 0000000000000..a572d5f5a178b --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Docs/Accounts.xml @@ -0,0 +1,117 @@ + + + + + +This sample shows how to call GetAccountAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + +Response response = await client.GetAccountAsync("sampleAccountId"); +]]> + + + +This sample shows how to call GetAccount. +"); +TokenCredential credential = new DefaultAzureCredential(); +Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + +Response response = client.GetAccount("sampleAccountId"); +]]> + + + +This sample shows how to call GetAccountAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + +Response response = await client.GetAccountAsync("sampleAccountId", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("subscriptionId").ToString()); +Console.WriteLine(result.GetProperty("subscriptionState").ToString()); +Console.WriteLine(result.GetProperty("tenantId").ToString()); +Console.WriteLine(result.GetProperty("location").ToString()); +]]> + + + +This sample shows how to call GetAccount and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + +Response response = client.GetAccount("sampleAccountId", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("resourceId").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("state").ToString()); +Console.WriteLine(result.GetProperty("subscriptionId").ToString()); +Console.WriteLine(result.GetProperty("subscriptionState").ToString()); +Console.WriteLine(result.GetProperty("tenantId").ToString()); +Console.WriteLine(result.GetProperty("location").ToString()); +]]> + + + +This sample shows how to call GetBrowsersAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + +Response response = await client.GetBrowsersAsync("sampleAccountId"); +]]> + + + +This sample shows how to call GetBrowsers. +"); +TokenCredential credential = new DefaultAzureCredential(); +Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + +Response response = client.GetBrowsers("sampleAccountId"); +]]> + + + +This sample shows how to call GetBrowsersAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + +Response response = await client.GetBrowsersAsync("sampleAccountId", null, "linux", null); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetBrowsers. +"); +TokenCredential credential = new DefaultAzureCredential(); +Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + +Response response = client.GetBrowsers("sampleAccountId", null, "linux", null); + +Console.WriteLine(response.Status); +]]> + + + \ No newline at end of file diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/EnablementStatus.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/EnablementStatus.cs similarity index 97% rename from sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/EnablementStatus.cs rename to sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/EnablementStatus.cs index 21f9490d4a2a5..98e5aab7d42d3 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/EnablementStatus.cs +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/EnablementStatus.cs @@ -8,7 +8,7 @@ using System; using System.ComponentModel; -namespace Azure.ResourceManager.PlaywrightTesting.Models +namespace Azure.Developer.MicrosoftPlaywrightTesting { /// The enablement status of a feature. public readonly partial struct EnablementStatus : IEquatable diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/Argument.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/Argument.cs new file mode 100644 index 0000000000000..751c33a54e9a5 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/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.Developer.MicrosoftPlaywrightTesting +{ + 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/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 0000000000000..f1d9708929269 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/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.Developer.MicrosoftPlaywrightTesting +{ + 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/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/ChangeTrackingList.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 0000000000000..19167552757eb --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/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.Developer.MicrosoftPlaywrightTesting +{ + 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/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 0000000000000..8eea5e0eb9acc --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,398 @@ +// 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.Developer.MicrosoftPlaywrightTesting +{ + internal static class ModelSerializationExtensions + { + 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/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/Optional.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/Optional.cs new file mode 100644 index 0000000000000..aeefc5cf26a9e --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/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.Developer.MicrosoftPlaywrightTesting +{ + 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/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 0000000000000..56ddcc549b347 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/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.Developer.MicrosoftPlaywrightTesting +{ + 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/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/OS.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/OS.cs new file mode 100644 index 0000000000000..5f60b83cb625b --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/OS.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.Developer.MicrosoftPlaywrightTesting +{ + /// The os to configure for remote test runs. + public readonly partial struct OS : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OS(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LinuxValue = "linux"; + private const string WindowsValue = "windows"; + + /// Linux OS. + public static OS Linux { get; } = new OS(LinuxValue); + /// Windows OS. + public static OS Windows { get; } = new OS(WindowsValue); + /// Determines if two values are the same. + public static bool operator ==(OS left, OS right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OS left, OS right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator OS(string value) => new OS(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OS other && Equals(other); + /// + public bool Equals(OS 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/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/SubscriptionState.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/SubscriptionState.cs new file mode 100644 index 0000000000000..d3fb25818b1af --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Generated/SubscriptionState.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.Developer.MicrosoftPlaywrightTesting +{ + /// The Azure subscription state. + public readonly partial struct SubscriptionState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SubscriptionState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RegisteredValue = "Registered"; + private const string WarnedValue = "Warned"; + private const string SuspendedValue = "Suspended"; + private const string DeletedValue = "Deleted"; + private const string UnregisteredValue = "Unregistered"; + + /// The subscription state is Registered. + public static SubscriptionState Registered { get; } = new SubscriptionState(RegisteredValue); + /// The subscription state is Warned. + public static SubscriptionState Warned { get; } = new SubscriptionState(WarnedValue); + /// The subscription state is Suspended. + public static SubscriptionState Suspended { get; } = new SubscriptionState(SuspendedValue); + /// The subscription state is Deleted. + public static SubscriptionState Deleted { get; } = new SubscriptionState(DeletedValue); + /// The subscription state is Unregistered. + public static SubscriptionState Unregistered { get; } = new SubscriptionState(UnregisteredValue); + /// Determines if two values are the same. + public static bool operator ==(SubscriptionState left, SubscriptionState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SubscriptionState left, SubscriptionState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SubscriptionState(string value) => new SubscriptionState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SubscriptionState other && Equals(other); + /// + public bool Equals(SubscriptionState 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/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Properties/AssemblyInfo.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/src/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000000..145709b2db913 --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/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.Developer.MicrosoftPlaywrightTesting.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("Microsoft.Template")] diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Azure.Developer.MicrosoftPlaywrightTesting.Tests.csproj b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Azure.Developer.MicrosoftPlaywrightTesting.Tests.csproj new file mode 100644 index 0000000000000..f3becb133be8d --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Azure.Developer.MicrosoftPlaywrightTesting.Tests.csproj @@ -0,0 +1,20 @@ + + + $(RequiredTargetFrameworks) + + $(NoWarn);CS1591 + + + + + + + + + + + + + + + diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Generated/Samples/Samples_AccessTokens.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Generated/Samples/Samples_AccessTokens.cs new file mode 100644 index 0000000000000..43e3006b850fe --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Generated/Samples/Samples_AccessTokens.cs @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.Samples +{ + public partial class Samples_AccessTokens + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AccessToken_CreateOrReplace_AccessTokensCreateOrReplace() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + using RequestContent content = RequestContent.Create(new + { + id = "00000000-0000-0000-0000-000000000000", + name = "sampleAccessToken", + expiryAt = "2022-09-28T12:32:33Z", + }); + Response response = client.CreateOrReplace("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("expiryAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AccessToken_CreateOrReplace_AccessTokensCreateOrReplace_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + using RequestContent content = RequestContent.Create(new + { + id = "00000000-0000-0000-0000-000000000000", + name = "sampleAccessToken", + expiryAt = "2022-09-28T12:32:33Z", + }); + Response response = await client.CreateOrReplaceAsync("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("expiryAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AccessToken_CreateOrReplace_AccessTokensCreateOrReplace_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + AccessToken resource = new AccessToken("sampleAccessToken", DateTimeOffset.Parse("2022-09-28T12:32:33Z")); + Response response = client.CreateOrReplace("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), resource); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AccessToken_CreateOrReplace_AccessTokensCreateOrReplace_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + AccessToken resource = new AccessToken("sampleAccessToken", DateTimeOffset.Parse("2022-09-28T12:32:33Z")); + Response response = await client.CreateOrReplaceAsync("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), resource); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AccessToken_GetAccessToken_AccessTokensGet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + Response response = client.GetAccessToken("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("expiryAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AccessToken_GetAccessToken_AccessTokensGet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + Response response = await client.GetAccessTokenAsync("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("expiryAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AccessToken_GetAccessToken_AccessTokensGet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + Response response = client.GetAccessToken("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AccessToken_GetAccessToken_AccessTokensGet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + Response response = await client.GetAccessTokenAsync("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AccessToken_Delete_AccessTokensDelete() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + Response response = client.Delete("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AccessToken_Delete_AccessTokensDelete_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + Response response = await client.DeleteAsync("sampleAccountId", Guid.Parse("00000000-0000-0000-0000-000000000000")); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AccessTokens_Validate_AccessTokensValidate() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + Response response = client.Validate("sampleAccountId"); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AccessTokens_Validate_AccessTokensValidate_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + Response response = await client.ValidateAsync("sampleAccountId"); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AccessToken_GetAccessTokens_AccessTokensList() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + foreach (BinaryData item in client.GetAccessTokens("sampleAccountId", null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("expiryAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AccessToken_GetAccessTokens_AccessTokensList_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + await foreach (BinaryData item in client.GetAccessTokensAsync("sampleAccountId", null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("createdAt").ToString()); + Console.WriteLine(result.GetProperty("expiryAt").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AccessToken_GetAccessTokens_AccessTokensList_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + foreach (AccessToken item in client.GetAccessTokens("sampleAccountId")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AccessToken_GetAccessTokens_AccessTokensList_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + AccessTokens client = new AuthManagerClient(endpoint, credential).GetAccessTokensClient(apiVersion: "2024-12-01"); + + await foreach (AccessToken item in client.GetAccessTokensAsync("sampleAccountId")) + { + } + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Generated/Samples/Samples_Accounts.cs b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Generated/Samples/Samples_Accounts.cs new file mode 100644 index 0000000000000..904af903de67c --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tests/Generated/Samples/Samples_Accounts.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.Developer.MicrosoftPlaywrightTesting.Samples +{ + public partial class Samples_Accounts + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Account_GetAccount_AccountsGet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + + Response response = client.GetAccount("sampleAccountId", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("subscriptionId").ToString()); + Console.WriteLine(result.GetProperty("subscriptionState").ToString()); + Console.WriteLine(result.GetProperty("tenantId").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Account_GetAccount_AccountsGet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + + Response response = await client.GetAccountAsync("sampleAccountId", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("resourceId").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("state").ToString()); + Console.WriteLine(result.GetProperty("subscriptionId").ToString()); + Console.WriteLine(result.GetProperty("subscriptionState").ToString()); + Console.WriteLine(result.GetProperty("tenantId").ToString()); + Console.WriteLine(result.GetProperty("location").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Account_GetAccount_AccountsGet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + + Response response = client.GetAccount("sampleAccountId"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Account_GetAccount_AccountsGet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + + Response response = await client.GetAccountAsync("sampleAccountId"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Accounts_GetBrowsers_AccountsGetBrowsers() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + + Response response = client.GetBrowsers("sampleAccountId", null, "linux", null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Accounts_GetBrowsers_AccountsGetBrowsers_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + + Response response = await client.GetBrowsersAsync("sampleAccountId", null, "linux", null); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Accounts_GetBrowsers_AccountsGetBrowsers_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + + Response response = client.GetBrowsers("sampleAccountId"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Accounts_GetBrowsers_AccountsGetBrowsers_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Accounts client = new AuthManagerClient(endpoint, credential).GetAccountsClient(apiVersion: "2024-12-01"); + + Response response = await client.GetBrowsersAsync("sampleAccountId"); + } + } +} diff --git a/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tsp-location.yaml b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tsp-location.yaml new file mode 100644 index 0000000000000..d70f07662c00e --- /dev/null +++ b/sdk/playwrighttesting/Azure.Developer.MicrosoftPlaywrightTesting/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/playwrighttesting/PlaywrightTesting.AuthManager +commit: f0b119999d4ba0d7a2f92eebc0f419f5ee66ff81 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/api/Azure.ResourceManager.PlaywrightTesting.net8.0.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/api/Azure.ResourceManager.PlaywrightTesting.net8.0.cs index 2f7e09b19bef9..8bae8011d56bf 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/api/Azure.ResourceManager.PlaywrightTesting.net8.0.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/api/Azure.ResourceManager.PlaywrightTesting.net8.0.cs @@ -3,16 +3,16 @@ namespace Azure.ResourceManager.PlaywrightTesting public partial class PlaywrightTestingAccountCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected PlaywrightTestingAccountCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string accountName, Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string accountName, Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string accountName, 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 name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string accountName, 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; } @@ -20,11 +20,7 @@ protected PlaywrightTestingAccountCollection() { } public partial class PlaywrightTestingAccountData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PlaywrightTestingAccountData(Azure.Core.AzureLocation location) { } - public System.Uri DashboardUri { get { throw null; } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus? RegionalAffinity { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus? Reporting { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus? ScalableExecution { get { throw null; } set { } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData 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) { } @@ -32,6 +28,47 @@ 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; } } + public partial class PlaywrightTestingAccountQuotaCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PlaywrightTestingAccountQuotaCollection() { } + public virtual Azure.Response Exists(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, 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(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, 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 PlaywrightTestingAccountQuotaData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PlaywrightTestingAccountQuotaData() { } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountQuotaProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaData 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.PlaywrightTesting.PlaywrightTestingAccountQuotaData 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 PlaywrightTestingAccountQuotaResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PlaywrightTestingAccountQuotaResource() { } + public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName) { 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.PlaywrightTesting.PlaywrightTestingAccountQuotaData 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.PlaywrightTesting.PlaywrightTestingAccountQuotaData 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 PlaywrightTestingAccountResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; @@ -40,11 +77,14 @@ protected PlaywrightTestingAccountResource() { } 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 name) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName) { 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.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaCollection GetAllPlaywrightTestingAccountQuota() { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetPlaywrightTestingAccountQuota(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPlaywrightTestingAccountQuotaAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, 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; } @@ -59,37 +99,39 @@ protected PlaywrightTestingAccountResource() { } } public static partial class PlaywrightTestingExtensions { - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaCollection GetAllPlaywrightTestingQuota(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location) { throw null; } - public static Azure.Response GetPlaywrightTestingAccount(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetPlaywrightTestingAccountAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response CheckPlaywrightTestingNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CheckPlaywrightTestingNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaCollection GetAllPlaywrightTestingQuota(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location) { throw null; } + public static Azure.Response GetPlaywrightTestingAccount(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetPlaywrightTestingAccountAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaResource GetPlaywrightTestingAccountQuotaResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountResource GetPlaywrightTestingAccountResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountCollection GetPlaywrightTestingAccounts(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetPlaywrightTestingAccounts(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetPlaywrightTestingAccountsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response GetPlaywrightTestingQuota(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetPlaywrightTestingQuotaAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetPlaywrightTestingQuota(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetPlaywrightTestingQuotaAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaResource GetPlaywrightTestingQuotaResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } public partial class PlaywrightTestingQuotaCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected PlaywrightTestingQuotaCollection() { } - public virtual Azure.Response Exists(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, 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(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, 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 PlaywrightTestingQuotaData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public PlaywrightTestingQuotaData() { } - public Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialProperties FreeTrial { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? ProvisioningState { get { throw null; } } + internal PlaywrightTestingQuotaData() { } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaProperties Properties { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaData 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) { } @@ -103,7 +145,7 @@ public partial class PlaywrightTestingQuotaResource : Azure.ResourceManager.ArmR protected PlaywrightTestingQuotaResource() { } public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, Azure.Core.AzureLocation location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, Azure.Core.AzureLocation location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName) { 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.PlaywrightTesting.PlaywrightTestingQuotaData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -118,99 +160,224 @@ namespace Azure.ResourceManager.PlaywrightTesting.Mocking public partial class MockablePlaywrightTestingArmClient : Azure.ResourceManager.ArmResource { protected MockablePlaywrightTestingArmClient() { } + public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaResource GetPlaywrightTestingAccountQuotaResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountResource GetPlaywrightTestingAccountResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaResource GetPlaywrightTestingQuotaResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockablePlaywrightTestingResourceGroupResource : Azure.ResourceManager.ArmResource { protected MockablePlaywrightTestingResourceGroupResource() { } - public virtual Azure.Response GetPlaywrightTestingAccount(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetPlaywrightTestingAccountAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetPlaywrightTestingAccount(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPlaywrightTestingAccountAsync(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountCollection GetPlaywrightTestingAccounts() { throw null; } } public partial class MockablePlaywrightTestingSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockablePlaywrightTestingSubscriptionResource() { } - public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaCollection GetAllPlaywrightTestingQuota(Azure.Core.AzureLocation location) { throw null; } + public virtual Azure.Response CheckPlaywrightTestingNameAvailability(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CheckPlaywrightTestingNameAvailabilityAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaCollection GetAllPlaywrightTestingQuota(string location) { throw null; } public virtual Azure.Pageable GetPlaywrightTestingAccounts(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPlaywrightTestingAccountsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetPlaywrightTestingQuota(Azure.Core.AzureLocation location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetPlaywrightTestingQuotaAsync(Azure.Core.AzureLocation location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetPlaywrightTestingQuota(string location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPlaywrightTestingQuotaAsync(string location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.PlaywrightTesting.Models { + public partial class AccountUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AccountUpdateProperties() { } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? LocalAuth { get { throw null; } set { } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? RegionalAffinity { get { throw null; } set { } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? Reporting { get { throw null; } set { } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? ScalableExecution { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlaywrightTesting.Models.AccountUpdateProperties 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.PlaywrightTesting.Models.AccountUpdateProperties 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 ArmPlaywrightTestingModelFactory { - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData PlaywrightTestingAccountData(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), System.Uri dashboardUri = null, Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus? regionalAffinity = default(Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus? scalableExecution = default(Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus? reporting = default(Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? provisioningState = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState?)) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaData PlaywrightTestingQuotaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialProperties freeTrial = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? provisioningState = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState?)) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData PlaywrightTestingAccountData(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.PlaywrightTesting.Models.PlaywrightTestingAccountProperties properties = null) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountFreeTrialProperties PlaywrightTestingAccountFreeTrialProperties(System.DateTimeOffset createdOn = default(System.DateTimeOffset), System.DateTimeOffset expiryOn = default(System.DateTimeOffset), int allocatedValue = 0, int usedValue = 0, float percentageUsed = 0f) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountProperties PlaywrightTestingAccountProperties(System.Uri dashboardUri = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? regionalAffinity = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? scalableExecution = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? reporting = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? localAuth = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? provisioningState = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState?)) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaData PlaywrightTestingAccountQuotaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountQuotaProperties properties = null) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountQuotaProperties PlaywrightTestingAccountQuotaProperties(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountFreeTrialProperties freeTrial = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? provisioningState = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState?)) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialProperties PlaywrightTestingFreeTrialProperties(string accountId = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState state = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState)) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityResult PlaywrightTestingNameAvailabilityResult(bool? isNameAvailable = default(bool?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason? reason = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason?), string message = null) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaData PlaywrightTestingQuotaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaProperties properties = null) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaProperties PlaywrightTestingQuotaProperties(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialProperties freeTrial = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType? offeringType = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? provisioningState = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState?)) { throw null; } + } + public partial class PlaywrightTestingAccountFreeTrialProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PlaywrightTestingAccountFreeTrialProperties() { } + public int AllocatedValue { get { throw null; } } + public System.DateTimeOffset CreatedOn { get { throw null; } } + public System.DateTimeOffset ExpiryOn { get { throw null; } } + public float PercentageUsed { get { throw null; } } + public int UsedValue { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountFreeTrialProperties 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.PlaywrightTesting.Models.PlaywrightTestingAccountFreeTrialProperties 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 PlaywrightTestingAccountPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PlaywrightTestingAccountPatch() { } + public Azure.ResourceManager.PlaywrightTesting.Models.AccountUpdateProperties 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.PlaywrightTesting.Models.PlaywrightTestingAccountPatch 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.PlaywrightTesting.Models.PlaywrightTestingAccountPatch 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 PlaywrightTestingAccountProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PlaywrightTestingAccountProperties() { } + public System.Uri DashboardUri { get { throw null; } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? LocalAuth { get { throw null; } set { } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? RegionalAffinity { get { throw null; } set { } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? Reporting { get { throw null; } set { } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? ScalableExecution { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountProperties 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.PlaywrightTesting.Models.PlaywrightTestingAccountProperties 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 PlaywrightTestingAccountQuotaProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PlaywrightTestingAccountQuotaProperties() { } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountFreeTrialProperties FreeTrial { get { throw null; } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountQuotaProperties 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.PlaywrightTesting.Models.PlaywrightTestingAccountQuotaProperties 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 EnablementStatus : System.IEquatable + public readonly partial struct PlaywrightTestingEnablementStatus : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public EnablementStatus(string value) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus Disabled { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus Enabled { get { throw null; } } - public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus other) { throw null; } + public PlaywrightTestingEnablementStatus(string value) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus 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.PlaywrightTesting.Models.EnablementStatus left, Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus left, Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus right) { throw null; } + public static bool operator ==(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus right) { throw null; } public override string ToString() { throw null; } } - public partial class FreeTrialProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class PlaywrightTestingFreeTrialProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public FreeTrialProperties(string accountId, System.DateTimeOffset createdOn, System.DateTimeOffset expiryOn, int allocatedValue, int usedValue, decimal percentageUsed, Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialState state) { } + internal PlaywrightTestingFreeTrialProperties() { } public string AccountId { get { throw null; } } - public int AllocatedValue { get { throw null; } } - public System.DateTimeOffset CreatedOn { get { throw null; } } - public System.DateTimeOffset ExpiryOn { get { throw null; } } - public decimal PercentageUsed { get { throw null; } } - public Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialState State { get { throw null; } } - public int UsedValue { get { throw null; } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState State { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialProperties 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.PlaywrightTesting.Models.FreeTrialProperties 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; } + Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialProperties 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.PlaywrightTesting.Models.PlaywrightTestingFreeTrialProperties 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 FreeTrialState : System.IEquatable + public readonly partial struct PlaywrightTestingFreeTrialState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public FreeTrialState(string value) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialState Active { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialState Expired { get { throw null; } } - public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialState other) { throw null; } + public PlaywrightTestingFreeTrialState(string value) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState Active { get { throw null; } } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState Expired { get { throw null; } } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState NotEligible { get { throw null; } } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState NotRegistered { get { throw null; } } + public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState 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.PlaywrightTesting.Models.FreeTrialState left, Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialState right) { throw null; } - public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialState left, Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState right) { throw null; } + public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState right) { throw null; } public override string ToString() { throw null; } } - public partial class PlaywrightTestingAccountPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class PlaywrightTestingNameAvailabilityContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public PlaywrightTestingAccountPatch() { } - public Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus? RegionalAffinity { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus? Reporting { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus? ScalableExecution { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public PlaywrightTestingNameAvailabilityContent() { } + public string Name { get { throw null; } set { } } + public string Type { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountPatch 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.PlaywrightTesting.Models.PlaywrightTestingAccountPatch 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; } + Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent 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.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent 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 PlaywrightTestingNameAvailabilityResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PlaywrightTestingNameAvailabilityResult() { } + public bool? IsNameAvailable { get { throw null; } } + public string Message { get { throw null; } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason? Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityResult 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.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityResult 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 PlaywrightTestingNameUnavailableReason : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PlaywrightTestingNameUnavailableReason(string value) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason AlreadyExists { get { throw null; } } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason Invalid { get { throw null; } } + public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason 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.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason right) { throw null; } + public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PlaywrightTestingOfferingType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PlaywrightTestingOfferingType(string value) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType GeneralAvailability { get { throw null; } } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType NotApplicable { get { throw null; } } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType PrivatePreview { get { throw null; } } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType PublicPreview { get { throw null; } } + public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType 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.PlaywrightTesting.Models.PlaywrightTestingOfferingType left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType right) { throw null; } + public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType right) { throw null; } + public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct PlaywrightTestingProvisioningState : System.IEquatable @@ -220,6 +387,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public PlaywrightTestingProvisioningState(string value) { throw null; } public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Accepted { get { throw null; } } public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Creating { get { throw null; } } public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Deleting { get { throw null; } } public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Failed { get { throw null; } } public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Succeeded { get { throw null; } } @@ -239,6 +407,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public PlaywrightTestingQuotaName(string value) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName Reporting { get { throw null; } } public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName ScalableExecution { get { throw null; } } public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -250,4 +419,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName right) { throw null; } public override string ToString() { throw null; } } + public partial class PlaywrightTestingQuotaProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PlaywrightTestingQuotaProperties() { } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialProperties FreeTrial { get { throw null; } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType? OfferingType { get { throw null; } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaProperties 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.PlaywrightTesting.Models.PlaywrightTestingQuotaProperties 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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/api/Azure.ResourceManager.PlaywrightTesting.netstandard2.0.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/api/Azure.ResourceManager.PlaywrightTesting.netstandard2.0.cs index 2f7e09b19bef9..8bae8011d56bf 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/api/Azure.ResourceManager.PlaywrightTesting.netstandard2.0.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/api/Azure.ResourceManager.PlaywrightTesting.netstandard2.0.cs @@ -3,16 +3,16 @@ namespace Azure.ResourceManager.PlaywrightTesting public partial class PlaywrightTestingAccountCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected PlaywrightTestingAccountCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string accountName, Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string accountName, Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string accountName, 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 name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string accountName, 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; } @@ -20,11 +20,7 @@ protected PlaywrightTestingAccountCollection() { } public partial class PlaywrightTestingAccountData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public PlaywrightTestingAccountData(Azure.Core.AzureLocation location) { } - public System.Uri DashboardUri { get { throw null; } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus? RegionalAffinity { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus? Reporting { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus? ScalableExecution { get { throw null; } set { } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData 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) { } @@ -32,6 +28,47 @@ 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; } } + public partial class PlaywrightTestingAccountQuotaCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PlaywrightTestingAccountQuotaCollection() { } + public virtual Azure.Response Exists(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, 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(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, 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 PlaywrightTestingAccountQuotaData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PlaywrightTestingAccountQuotaData() { } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountQuotaProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaData 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.PlaywrightTesting.PlaywrightTestingAccountQuotaData 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 PlaywrightTestingAccountQuotaResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PlaywrightTestingAccountQuotaResource() { } + public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName) { 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.PlaywrightTesting.PlaywrightTestingAccountQuotaData 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.PlaywrightTesting.PlaywrightTestingAccountQuotaData 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 PlaywrightTestingAccountResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; @@ -40,11 +77,14 @@ protected PlaywrightTestingAccountResource() { } 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 name) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName) { 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.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaCollection GetAllPlaywrightTestingAccountQuota() { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetPlaywrightTestingAccountQuota(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPlaywrightTestingAccountQuotaAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, 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; } @@ -59,37 +99,39 @@ protected PlaywrightTestingAccountResource() { } } public static partial class PlaywrightTestingExtensions { - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaCollection GetAllPlaywrightTestingQuota(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location) { throw null; } - public static Azure.Response GetPlaywrightTestingAccount(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetPlaywrightTestingAccountAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response CheckPlaywrightTestingNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CheckPlaywrightTestingNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaCollection GetAllPlaywrightTestingQuota(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location) { throw null; } + public static Azure.Response GetPlaywrightTestingAccount(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetPlaywrightTestingAccountAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaResource GetPlaywrightTestingAccountQuotaResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountResource GetPlaywrightTestingAccountResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountCollection GetPlaywrightTestingAccounts(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetPlaywrightTestingAccounts(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetPlaywrightTestingAccountsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response GetPlaywrightTestingQuota(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetPlaywrightTestingQuotaAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetPlaywrightTestingQuota(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetPlaywrightTestingQuotaAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaResource GetPlaywrightTestingQuotaResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } public partial class PlaywrightTestingQuotaCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected PlaywrightTestingQuotaCollection() { } - public virtual Azure.Response Exists(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, 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(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, 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 PlaywrightTestingQuotaData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public PlaywrightTestingQuotaData() { } - public Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialProperties FreeTrial { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? ProvisioningState { get { throw null; } } + internal PlaywrightTestingQuotaData() { } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaProperties Properties { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaData 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) { } @@ -103,7 +145,7 @@ public partial class PlaywrightTestingQuotaResource : Azure.ResourceManager.ArmR protected PlaywrightTestingQuotaResource() { } public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, Azure.Core.AzureLocation location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, Azure.Core.AzureLocation location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName) { 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.PlaywrightTesting.PlaywrightTestingQuotaData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -118,99 +160,224 @@ namespace Azure.ResourceManager.PlaywrightTesting.Mocking public partial class MockablePlaywrightTestingArmClient : Azure.ResourceManager.ArmResource { protected MockablePlaywrightTestingArmClient() { } + public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaResource GetPlaywrightTestingAccountQuotaResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountResource GetPlaywrightTestingAccountResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaResource GetPlaywrightTestingQuotaResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockablePlaywrightTestingResourceGroupResource : Azure.ResourceManager.ArmResource { protected MockablePlaywrightTestingResourceGroupResource() { } - public virtual Azure.Response GetPlaywrightTestingAccount(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetPlaywrightTestingAccountAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetPlaywrightTestingAccount(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPlaywrightTestingAccountAsync(string accountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountCollection GetPlaywrightTestingAccounts() { throw null; } } public partial class MockablePlaywrightTestingSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockablePlaywrightTestingSubscriptionResource() { } - public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaCollection GetAllPlaywrightTestingQuota(Azure.Core.AzureLocation location) { throw null; } + public virtual Azure.Response CheckPlaywrightTestingNameAvailability(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CheckPlaywrightTestingNameAvailabilityAsync(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaCollection GetAllPlaywrightTestingQuota(string location) { throw null; } public virtual Azure.Pageable GetPlaywrightTestingAccounts(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPlaywrightTestingAccountsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetPlaywrightTestingQuota(Azure.Core.AzureLocation location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetPlaywrightTestingQuotaAsync(Azure.Core.AzureLocation location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetPlaywrightTestingQuota(string location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPlaywrightTestingQuotaAsync(string location, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName quotaName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.PlaywrightTesting.Models { + public partial class AccountUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AccountUpdateProperties() { } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? LocalAuth { get { throw null; } set { } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? RegionalAffinity { get { throw null; } set { } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? Reporting { get { throw null; } set { } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? ScalableExecution { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlaywrightTesting.Models.AccountUpdateProperties 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.PlaywrightTesting.Models.AccountUpdateProperties 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 ArmPlaywrightTestingModelFactory { - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData PlaywrightTestingAccountData(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), System.Uri dashboardUri = null, Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus? regionalAffinity = default(Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus? scalableExecution = default(Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus? reporting = default(Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? provisioningState = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState?)) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaData PlaywrightTestingQuotaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialProperties freeTrial = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? provisioningState = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState?)) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountData PlaywrightTestingAccountData(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.PlaywrightTesting.Models.PlaywrightTestingAccountProperties properties = null) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountFreeTrialProperties PlaywrightTestingAccountFreeTrialProperties(System.DateTimeOffset createdOn = default(System.DateTimeOffset), System.DateTimeOffset expiryOn = default(System.DateTimeOffset), int allocatedValue = 0, int usedValue = 0, float percentageUsed = 0f) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountProperties PlaywrightTestingAccountProperties(System.Uri dashboardUri = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? regionalAffinity = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? scalableExecution = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? reporting = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? localAuth = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? provisioningState = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState?)) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingAccountQuotaData PlaywrightTestingAccountQuotaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountQuotaProperties properties = null) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountQuotaProperties PlaywrightTestingAccountQuotaProperties(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountFreeTrialProperties freeTrial = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? provisioningState = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState?)) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialProperties PlaywrightTestingFreeTrialProperties(string accountId = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState state = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState)) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityResult PlaywrightTestingNameAvailabilityResult(bool? isNameAvailable = default(bool?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason? reason = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason?), string message = null) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.PlaywrightTestingQuotaData PlaywrightTestingQuotaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaProperties properties = null) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaProperties PlaywrightTestingQuotaProperties(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialProperties freeTrial = null, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType? offeringType = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType?), Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? provisioningState = default(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState?)) { throw null; } + } + public partial class PlaywrightTestingAccountFreeTrialProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PlaywrightTestingAccountFreeTrialProperties() { } + public int AllocatedValue { get { throw null; } } + public System.DateTimeOffset CreatedOn { get { throw null; } } + public System.DateTimeOffset ExpiryOn { get { throw null; } } + public float PercentageUsed { get { throw null; } } + public int UsedValue { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountFreeTrialProperties 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.PlaywrightTesting.Models.PlaywrightTestingAccountFreeTrialProperties 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 PlaywrightTestingAccountPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PlaywrightTestingAccountPatch() { } + public Azure.ResourceManager.PlaywrightTesting.Models.AccountUpdateProperties 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.PlaywrightTesting.Models.PlaywrightTestingAccountPatch 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.PlaywrightTesting.Models.PlaywrightTestingAccountPatch 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 PlaywrightTestingAccountProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PlaywrightTestingAccountProperties() { } + public System.Uri DashboardUri { get { throw null; } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? LocalAuth { get { throw null; } set { } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? RegionalAffinity { get { throw null; } set { } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? Reporting { get { throw null; } set { } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus? ScalableExecution { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountProperties 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.PlaywrightTesting.Models.PlaywrightTestingAccountProperties 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 PlaywrightTestingAccountQuotaProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PlaywrightTestingAccountQuotaProperties() { } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountFreeTrialProperties FreeTrial { get { throw null; } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountQuotaProperties 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.PlaywrightTesting.Models.PlaywrightTestingAccountQuotaProperties 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 EnablementStatus : System.IEquatable + public readonly partial struct PlaywrightTestingEnablementStatus : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public EnablementStatus(string value) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus Disabled { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus Enabled { get { throw null; } } - public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus other) { throw null; } + public PlaywrightTestingEnablementStatus(string value) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus 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.PlaywrightTesting.Models.EnablementStatus left, Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus left, Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus right) { throw null; } + public static bool operator ==(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingEnablementStatus right) { throw null; } public override string ToString() { throw null; } } - public partial class FreeTrialProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class PlaywrightTestingFreeTrialProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public FreeTrialProperties(string accountId, System.DateTimeOffset createdOn, System.DateTimeOffset expiryOn, int allocatedValue, int usedValue, decimal percentageUsed, Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialState state) { } + internal PlaywrightTestingFreeTrialProperties() { } public string AccountId { get { throw null; } } - public int AllocatedValue { get { throw null; } } - public System.DateTimeOffset CreatedOn { get { throw null; } } - public System.DateTimeOffset ExpiryOn { get { throw null; } } - public decimal PercentageUsed { get { throw null; } } - public Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialState State { get { throw null; } } - public int UsedValue { get { throw null; } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState State { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialProperties 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.PlaywrightTesting.Models.FreeTrialProperties 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; } + Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialProperties 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.PlaywrightTesting.Models.PlaywrightTestingFreeTrialProperties 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 FreeTrialState : System.IEquatable + public readonly partial struct PlaywrightTestingFreeTrialState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public FreeTrialState(string value) { throw null; } - public static Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialState Active { get { throw null; } } - public static Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialState Expired { get { throw null; } } - public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialState other) { throw null; } + public PlaywrightTestingFreeTrialState(string value) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState Active { get { throw null; } } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState Expired { get { throw null; } } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState NotEligible { get { throw null; } } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState NotRegistered { get { throw null; } } + public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState 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.PlaywrightTesting.Models.FreeTrialState left, Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialState right) { throw null; } - public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialState left, Azure.ResourceManager.PlaywrightTesting.Models.FreeTrialState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState right) { throw null; } + public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialState right) { throw null; } public override string ToString() { throw null; } } - public partial class PlaywrightTestingAccountPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class PlaywrightTestingNameAvailabilityContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public PlaywrightTestingAccountPatch() { } - public Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus? RegionalAffinity { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus? Reporting { get { throw null; } set { } } - public Azure.ResourceManager.PlaywrightTesting.Models.EnablementStatus? ScalableExecution { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public PlaywrightTestingNameAvailabilityContent() { } + public string Name { get { throw null; } set { } } + public string Type { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingAccountPatch 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.PlaywrightTesting.Models.PlaywrightTestingAccountPatch 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; } + Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent 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.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityContent 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 PlaywrightTestingNameAvailabilityResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PlaywrightTestingNameAvailabilityResult() { } + public bool? IsNameAvailable { get { throw null; } } + public string Message { get { throw null; } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason? Reason { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityResult 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.PlaywrightTesting.Models.PlaywrightTestingNameAvailabilityResult 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 PlaywrightTestingNameUnavailableReason : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PlaywrightTestingNameUnavailableReason(string value) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason AlreadyExists { get { throw null; } } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason Invalid { get { throw null; } } + public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason 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.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason right) { throw null; } + public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingNameUnavailableReason right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PlaywrightTestingOfferingType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PlaywrightTestingOfferingType(string value) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType GeneralAvailability { get { throw null; } } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType NotApplicable { get { throw null; } } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType PrivatePreview { get { throw null; } } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType PublicPreview { get { throw null; } } + public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType 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.PlaywrightTesting.Models.PlaywrightTestingOfferingType left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType right) { throw null; } + public static implicit operator Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType right) { throw null; } + public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct PlaywrightTestingProvisioningState : System.IEquatable @@ -220,6 +387,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public PlaywrightTestingProvisioningState(string value) { throw null; } public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Accepted { get { throw null; } } public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Creating { get { throw null; } } public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Deleting { get { throw null; } } public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Failed { get { throw null; } } public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState Succeeded { get { throw null; } } @@ -239,6 +407,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public PlaywrightTestingQuotaName(string value) { throw null; } + public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName Reporting { get { throw null; } } public static Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName ScalableExecution { get { throw null; } } public bool Equals(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -250,4 +419,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName left, Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaName right) { throw null; } public override string ToString() { throw null; } } + public partial class PlaywrightTestingQuotaProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PlaywrightTestingQuotaProperties() { } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingFreeTrialProperties FreeTrial { get { throw null; } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingOfferingType? OfferingType { get { throw null; } } + public Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingProvisioningState? ProvisioningState { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PlaywrightTesting.Models.PlaywrightTestingQuotaProperties 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.PlaywrightTesting.Models.PlaywrightTestingQuotaProperties 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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountCollection.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountCollection.cs index b8d39fa590114..aebbdedd932e7 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountCollection.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountCollection.cs @@ -21,8 +21,8 @@ public partial class Sample_PlaywrightTestingAccountCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AccountsCreateOrUpdate() { - // Generated from example definition: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_CreateOrUpdate.json - // this example is just showing the usage of "Accounts_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-01/Accounts_CreateOrUpdate.json + // this example is just showing the usage of "Account_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(); @@ -40,16 +40,19 @@ public async Task CreateOrUpdate_AccountsCreateOrUpdate() PlaywrightTestingAccountCollection collection = resourceGroupResource.GetPlaywrightTestingAccounts(); // invoke the operation - string name = "myPlaywrightAccount"; + string accountName = "myPlaywrightAccount"; PlaywrightTestingAccountData data = new PlaywrightTestingAccountData(new AzureLocation("westus")) { - RegionalAffinity = EnablementStatus.Enabled, + Properties = new PlaywrightTestingAccountProperties + { + RegionalAffinity = PlaywrightTestingEnablementStatus.Enabled, + }, Tags = { ["Team"] = "Dev Exp" }, }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, accountName, data); PlaywrightTestingAccountResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well @@ -58,143 +61,5 @@ public async Task CreateOrUpdate_AccountsCreateOrUpdate() // 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_AccountsGet() - { - // Generated from example definition: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Get.json - // this example is just showing the usage of "Accounts_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 = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "dummyrg"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this PlaywrightTestingAccountResource - PlaywrightTestingAccountCollection collection = resourceGroupResource.GetPlaywrightTestingAccounts(); - - // invoke the operation - string name = "myPlaywrightAccount"; - PlaywrightTestingAccountResource result = await collection.GetAsync(name); - - // 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 - PlaywrightTestingAccountData 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_AccountsListByResourceGroup() - { - // Generated from example definition: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_ListByResourceGroup.json - // this example is just showing the usage of "Accounts_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 = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "dummyrg"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this PlaywrightTestingAccountResource - PlaywrightTestingAccountCollection collection = resourceGroupResource.GetPlaywrightTestingAccounts(); - - // invoke the operation and iterate over the result - await foreach (PlaywrightTestingAccountResource 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 - PlaywrightTestingAccountData 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_AccountsGet() - { - // Generated from example definition: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Get.json - // this example is just showing the usage of "Accounts_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 = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "dummyrg"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this PlaywrightTestingAccountResource - PlaywrightTestingAccountCollection collection = resourceGroupResource.GetPlaywrightTestingAccounts(); - - // invoke the operation - string name = "myPlaywrightAccount"; - bool result = await collection.ExistsAsync(name); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_AccountsGet() - { - // Generated from example definition: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Get.json - // this example is just showing the usage of "Accounts_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 = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "dummyrg"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this PlaywrightTestingAccountResource - PlaywrightTestingAccountCollection collection = resourceGroupResource.GetPlaywrightTestingAccounts(); - - // invoke the operation - string name = "myPlaywrightAccount"; - NullableResponse response = await collection.GetIfExistsAsync(name); - PlaywrightTestingAccountResource 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 - PlaywrightTestingAccountData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } } } diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountQuotaCollection.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountQuotaCollection.cs new file mode 100644 index 0000000000000..48997baf2881e --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountQuotaCollection.cs @@ -0,0 +1,161 @@ +// 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.PlaywrightTesting.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.PlaywrightTesting.Samples +{ + public partial class Sample_PlaywrightTestingAccountQuotaCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AccountQuotasGet() + { + // Generated from example definition: 2024-12-01/AccountQuotas_Get.json + // this example is just showing the usage of "AccountQuota_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 PlaywrightTestingAccountResource created on azure + // for more information of creating PlaywrightTestingAccountResource, please refer to the document of PlaywrightTestingAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "dummyrg"; + string accountName = "myPlaywrightAccount"; + ResourceIdentifier playwrightTestingAccountResourceId = PlaywrightTestingAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + PlaywrightTestingAccountResource playwrightTestingAccount = client.GetPlaywrightTestingAccountResource(playwrightTestingAccountResourceId); + + // get the collection of this PlaywrightTestingAccountQuotaResource + PlaywrightTestingAccountQuotaCollection collection = playwrightTestingAccount.GetAllPlaywrightTestingAccountQuota(); + + // invoke the operation + PlaywrightTestingQuotaName quotaName = PlaywrightTestingQuotaName.ScalableExecution; + PlaywrightTestingAccountQuotaResource result = await collection.GetAsync(quotaName); + + // 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 + PlaywrightTestingAccountQuotaData 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_AccountQuotasListByAccount() + { + // Generated from example definition: 2024-12-01/AccountQuotas_ListByAccount.json + // this example is just showing the usage of "AccountQuota_ListByAccount" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 PlaywrightTestingAccountResource created on azure + // for more information of creating PlaywrightTestingAccountResource, please refer to the document of PlaywrightTestingAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "dummyrg"; + string accountName = "myPlaywrightAccount"; + ResourceIdentifier playwrightTestingAccountResourceId = PlaywrightTestingAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + PlaywrightTestingAccountResource playwrightTestingAccount = client.GetPlaywrightTestingAccountResource(playwrightTestingAccountResourceId); + + // get the collection of this PlaywrightTestingAccountQuotaResource + PlaywrightTestingAccountQuotaCollection collection = playwrightTestingAccount.GetAllPlaywrightTestingAccountQuota(); + + // invoke the operation and iterate over the result + await foreach (PlaywrightTestingAccountQuotaResource 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 + PlaywrightTestingAccountQuotaData 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_AccountQuotasGet() + { + // Generated from example definition: 2024-12-01/AccountQuotas_Get.json + // this example is just showing the usage of "AccountQuota_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 PlaywrightTestingAccountResource created on azure + // for more information of creating PlaywrightTestingAccountResource, please refer to the document of PlaywrightTestingAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "dummyrg"; + string accountName = "myPlaywrightAccount"; + ResourceIdentifier playwrightTestingAccountResourceId = PlaywrightTestingAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + PlaywrightTestingAccountResource playwrightTestingAccount = client.GetPlaywrightTestingAccountResource(playwrightTestingAccountResourceId); + + // get the collection of this PlaywrightTestingAccountQuotaResource + PlaywrightTestingAccountQuotaCollection collection = playwrightTestingAccount.GetAllPlaywrightTestingAccountQuota(); + + // invoke the operation + PlaywrightTestingQuotaName quotaName = PlaywrightTestingQuotaName.ScalableExecution; + bool result = await collection.ExistsAsync(quotaName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AccountQuotasGet() + { + // Generated from example definition: 2024-12-01/AccountQuotas_Get.json + // this example is just showing the usage of "AccountQuota_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 PlaywrightTestingAccountResource created on azure + // for more information of creating PlaywrightTestingAccountResource, please refer to the document of PlaywrightTestingAccountResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "dummyrg"; + string accountName = "myPlaywrightAccount"; + ResourceIdentifier playwrightTestingAccountResourceId = PlaywrightTestingAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); + PlaywrightTestingAccountResource playwrightTestingAccount = client.GetPlaywrightTestingAccountResource(playwrightTestingAccountResourceId); + + // get the collection of this PlaywrightTestingAccountQuotaResource + PlaywrightTestingAccountQuotaCollection collection = playwrightTestingAccount.GetAllPlaywrightTestingAccountQuota(); + + // invoke the operation + PlaywrightTestingQuotaName quotaName = PlaywrightTestingQuotaName.ScalableExecution; + NullableResponse response = await collection.GetIfExistsAsync(quotaName); + PlaywrightTestingAccountQuotaResource 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 + PlaywrightTestingAccountQuotaData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountQuotaResource.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountQuotaResource.cs new file mode 100644 index 0000000000000..3588cf3627760 --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountQuotaResource.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.PlaywrightTesting.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.PlaywrightTesting.Samples +{ + public partial class Sample_PlaywrightTestingAccountQuotaResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AccountQuotasGet() + { + // Generated from example definition: 2024-12-01/AccountQuotas_Get.json + // this example is just showing the usage of "AccountQuota_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 PlaywrightTestingAccountQuotaResource created on azure + // for more information of creating PlaywrightTestingAccountQuotaResource, please refer to the document of PlaywrightTestingAccountQuotaResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "dummyrg"; + string accountName = "myPlaywrightAccount"; + PlaywrightTestingQuotaName quotaName = PlaywrightTestingQuotaName.ScalableExecution; + ResourceIdentifier playwrightTestingAccountQuotaResourceId = PlaywrightTestingAccountQuotaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, quotaName); + PlaywrightTestingAccountQuotaResource playwrightTestingAccountQuota = client.GetPlaywrightTestingAccountQuotaResource(playwrightTestingAccountQuotaResourceId); + + // invoke the operation + PlaywrightTestingAccountQuotaResource result = await playwrightTestingAccountQuota.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 + PlaywrightTestingAccountQuotaData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountResource.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountResource.cs index 7f4a0091fd0d5..e5b6390a3ead1 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountResource.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingAccountResource.cs @@ -16,42 +16,12 @@ namespace Azure.ResourceManager.PlaywrightTesting.Samples { public partial class Sample_PlaywrightTestingAccountResource { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_AccountsGet() - { - // Generated from example definition: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Get.json - // this example is just showing the usage of "Accounts_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 PlaywrightTestingAccountResource created on azure - // for more information of creating PlaywrightTestingAccountResource, please refer to the document of PlaywrightTestingAccountResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "dummyrg"; - string name = "myPlaywrightAccount"; - ResourceIdentifier playwrightTestingAccountResourceId = PlaywrightTestingAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); - PlaywrightTestingAccountResource playwrightTestingAccount = client.GetPlaywrightTestingAccountResource(playwrightTestingAccountResourceId); - - // invoke the operation - PlaywrightTestingAccountResource result = await playwrightTestingAccount.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 - PlaywrightTestingAccountData 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_AccountsDelete() { - // Generated from example definition: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Delete.json - // this example is just showing the usage of "Accounts_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-01/Accounts_Delete.json + // this example is just showing the usage of "Account_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(); @@ -62,8 +32,8 @@ public async Task Delete_AccountsDelete() // for more information of creating PlaywrightTestingAccountResource, please refer to the document of PlaywrightTestingAccountResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "dummyrg"; - string name = "myPlaywrightAccount"; - ResourceIdentifier playwrightTestingAccountResourceId = PlaywrightTestingAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + string accountName = "myPlaywrightAccount"; + ResourceIdentifier playwrightTestingAccountResourceId = PlaywrightTestingAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); PlaywrightTestingAccountResource playwrightTestingAccount = client.GetPlaywrightTestingAccountResource(playwrightTestingAccountResourceId); // invoke the operation @@ -76,8 +46,8 @@ public async Task Delete_AccountsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_AccountsUpdate() { - // Generated from example definition: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Update.json - // this example is just showing the usage of "Accounts_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-01/Accounts_Update.json + // this example is just showing the usage of "Account_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(); @@ -88,8 +58,8 @@ public async Task Update_AccountsUpdate() // for more information of creating PlaywrightTestingAccountResource, please refer to the document of PlaywrightTestingAccountResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; string resourceGroupName = "dummyrg"; - string name = "myPlaywrightAccount"; - ResourceIdentifier playwrightTestingAccountResourceId = PlaywrightTestingAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); + string accountName = "myPlaywrightAccount"; + ResourceIdentifier playwrightTestingAccountResourceId = PlaywrightTestingAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName); PlaywrightTestingAccountResource playwrightTestingAccount = client.GetPlaywrightTestingAccountResource(playwrightTestingAccountResourceId); // invoke the operation @@ -97,10 +67,13 @@ public async Task Update_AccountsUpdate() { Tags = { -["Division"] = "LT", -["Team"] = "Dev Exp" +["Team"] = "Dev Exp", +["Division"] = "LT" }, - RegionalAffinity = EnablementStatus.Enabled, + Properties = new AccountUpdateProperties + { + RegionalAffinity = PlaywrightTestingEnablementStatus.Enabled, + }, }; PlaywrightTestingAccountResource result = await playwrightTestingAccount.UpdateAsync(patch); diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingQuotaCollection.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingQuotaCollection.cs index f17ae04b5e1c0..185013c363339 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingQuotaCollection.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingQuotaCollection.cs @@ -21,8 +21,8 @@ public partial class Sample_PlaywrightTestingQuotaCollection [Ignore("Only validating compilation of examples")] public async Task Get_QuotasGet() { - // Generated from example definition: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Quotas_Get.json - // this example is just showing the usage of "Quotas_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-01/Quotas_Get.json + // this example is just showing the usage of "Quota_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(); @@ -36,12 +36,12 @@ public async Task Get_QuotasGet() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // get the collection of this PlaywrightTestingQuotaResource - AzureLocation location = new AzureLocation("eastus"); + string location = "eastus"; PlaywrightTestingQuotaCollection collection = subscriptionResource.GetAllPlaywrightTestingQuota(location); // invoke the operation - PlaywrightTestingQuotaName name = PlaywrightTestingQuotaName.ScalableExecution; - PlaywrightTestingQuotaResource result = await collection.GetAsync(name); + PlaywrightTestingQuotaName quotaName = PlaywrightTestingQuotaName.ScalableExecution; + PlaywrightTestingQuotaResource result = await collection.GetAsync(quotaName); // 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 @@ -54,8 +54,8 @@ public async Task Get_QuotasGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_QuotasListBySubscription() { - // Generated from example definition: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Quotas_ListBySubscription.json - // this example is just showing the usage of "Quotas_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-01/Quotas_ListBySubscription.json + // this example is just showing the usage of "Quota_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(); @@ -69,7 +69,7 @@ public async Task GetAll_QuotasListBySubscription() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // get the collection of this PlaywrightTestingQuotaResource - AzureLocation location = new AzureLocation("eastus"); + string location = "eastus"; PlaywrightTestingQuotaCollection collection = subscriptionResource.GetAllPlaywrightTestingQuota(location); // invoke the operation and iterate over the result @@ -89,8 +89,8 @@ public async Task GetAll_QuotasListBySubscription() [Ignore("Only validating compilation of examples")] public async Task Exists_QuotasGet() { - // Generated from example definition: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Quotas_Get.json - // this example is just showing the usage of "Quotas_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-01/Quotas_Get.json + // this example is just showing the usage of "Quota_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(); @@ -104,12 +104,12 @@ public async Task Exists_QuotasGet() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // get the collection of this PlaywrightTestingQuotaResource - AzureLocation location = new AzureLocation("eastus"); + string location = "eastus"; PlaywrightTestingQuotaCollection collection = subscriptionResource.GetAllPlaywrightTestingQuota(location); // invoke the operation - PlaywrightTestingQuotaName name = PlaywrightTestingQuotaName.ScalableExecution; - bool result = await collection.ExistsAsync(name); + PlaywrightTestingQuotaName quotaName = PlaywrightTestingQuotaName.ScalableExecution; + bool result = await collection.ExistsAsync(quotaName); Console.WriteLine($"Succeeded: {result}"); } @@ -118,8 +118,8 @@ public async Task Exists_QuotasGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_QuotasGet() { - // Generated from example definition: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Quotas_Get.json - // this example is just showing the usage of "Quotas_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-01/Quotas_Get.json + // this example is just showing the usage of "Quota_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(); @@ -133,12 +133,12 @@ public async Task GetIfExists_QuotasGet() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // get the collection of this PlaywrightTestingQuotaResource - AzureLocation location = new AzureLocation("eastus"); + string location = "eastus"; PlaywrightTestingQuotaCollection collection = subscriptionResource.GetAllPlaywrightTestingQuota(location); // invoke the operation - PlaywrightTestingQuotaName name = PlaywrightTestingQuotaName.ScalableExecution; - NullableResponse response = await collection.GetIfExistsAsync(name); + PlaywrightTestingQuotaName quotaName = PlaywrightTestingQuotaName.ScalableExecution; + NullableResponse response = await collection.GetIfExistsAsync(quotaName); PlaywrightTestingQuotaResource result = response.HasValue ? response.Value : null; if (result == null) diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingQuotaResource.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingQuotaResource.cs index 2268453872cb5..22387c22061fa 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingQuotaResource.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_PlaywrightTestingQuotaResource.cs @@ -20,8 +20,8 @@ public partial class Sample_PlaywrightTestingQuotaResource [Ignore("Only validating compilation of examples")] public async Task Get_QuotasGet() { - // Generated from example definition: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Quotas_Get.json - // this example is just showing the usage of "Quotas_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-01/Quotas_Get.json + // this example is just showing the usage of "Quota_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(); @@ -31,9 +31,9 @@ public async Task Get_QuotasGet() // this example assumes you already have this PlaywrightTestingQuotaResource created on azure // for more information of creating PlaywrightTestingQuotaResource, please refer to the document of PlaywrightTestingQuotaResource string subscriptionId = "00000000-0000-0000-0000-000000000000"; - AzureLocation location = new AzureLocation("eastus"); - PlaywrightTestingQuotaName name = PlaywrightTestingQuotaName.ScalableExecution; - ResourceIdentifier playwrightTestingQuotaResourceId = PlaywrightTestingQuotaResource.CreateResourceIdentifier(subscriptionId, location, name); + string location = "eastus"; + PlaywrightTestingQuotaName quotaName = PlaywrightTestingQuotaName.ScalableExecution; + ResourceIdentifier playwrightTestingQuotaResourceId = PlaywrightTestingQuotaResource.CreateResourceIdentifier(subscriptionId, location, quotaName); PlaywrightTestingQuotaResource playwrightTestingQuota = client.GetPlaywrightTestingQuotaResource(playwrightTestingQuotaResourceId); // invoke the operation diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index d3357cd6bd93c..766aee6e99a39 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.PlaywrightTesting.Models; using Azure.ResourceManager.Resources; using NUnit.Framework; @@ -18,10 +19,10 @@ public partial class Sample_SubscriptionResourceExtensions { [Test] [Ignore("Only validating compilation of examples")] - public async Task GetPlaywrightTestingAccounts_AccountsListBySubscription() + public async Task CheckPlaywrightTestingNameAvailability_AccountsCheckNameAvailability() { - // Generated from example definition: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_ListBySubscription.json - // this example is just showing the usage of "Accounts_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2024-12-01/Accounts_CheckNameAvailability.json + // this example is just showing the usage of "Accounts_CheckPlaywrightTestingNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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(); @@ -34,17 +35,15 @@ public async Task GetPlaywrightTestingAccounts_AccountsListBySubscription() ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - // invoke the operation and iterate over the result - await foreach (PlaywrightTestingAccountResource item in subscriptionResource.GetPlaywrightTestingAccountsAsync()) + // invoke the operation + PlaywrightTestingNameAvailabilityContent content = new PlaywrightTestingNameAvailabilityContent { - // 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 - PlaywrightTestingAccountData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); + Name = "dummyName", + Type = "Microsoft.AzurePlaywrightService/Accounts", + }; + PlaywrightTestingNameAvailabilityResult result = await subscriptionResource.CheckPlaywrightTestingNameAvailabilityAsync(content); + + Console.WriteLine($"Succeeded: {result}"); } } } diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/ArmPlaywrightTestingModelFactory.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/ArmPlaywrightTestingModelFactory.cs index e4799441a6625..24fc9f1612fa7 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/ArmPlaywrightTestingModelFactory.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/ArmPlaywrightTestingModelFactory.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; using Azure.Core; using Azure.ResourceManager.Models; @@ -15,6 +16,88 @@ namespace Azure.ResourceManager.PlaywrightTesting.Models /// Model factory for models. public static partial class ArmPlaywrightTestingModelFactory { + /// 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 PlaywrightTestingAccountQuotaData PlaywrightTestingAccountQuotaData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PlaywrightTestingAccountQuotaProperties properties = null) + { + return new PlaywrightTestingAccountQuotaData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The Playwright service account quota resource free-trial properties. + /// The status of the last operation. + /// A new instance for mocking. + public static PlaywrightTestingAccountQuotaProperties PlaywrightTestingAccountQuotaProperties(PlaywrightTestingAccountFreeTrialProperties freeTrial = null, PlaywrightTestingProvisioningState? provisioningState = null) + { + return new PlaywrightTestingAccountQuotaProperties(freeTrial, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The free-trial createdAt utcDateTime. + /// The free-trial expiryAt utcDateTime. + /// The free-trial allocated limit value eg. allocated free minutes. + /// The free-trial used value eg. used free minutes. + /// The free-trial percentage used. + /// A new instance for mocking. + public static PlaywrightTestingAccountFreeTrialProperties PlaywrightTestingAccountFreeTrialProperties(DateTimeOffset createdOn = default, DateTimeOffset expiryOn = default, int allocatedValue = default, int usedValue = default, float percentageUsed = default) + { + return new PlaywrightTestingAccountFreeTrialProperties( + createdOn, + expiryOn, + allocatedValue, + usedValue, + percentageUsed, + 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 PlaywrightTestingQuotaData PlaywrightTestingQuotaData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PlaywrightTestingQuotaProperties properties = null) + { + return new PlaywrightTestingQuotaData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The subscription quota resource free-trial properties. + /// Indicates the offering type for the subscription. + /// The status of the last operation. + /// A new instance for mocking. + public static PlaywrightTestingQuotaProperties PlaywrightTestingQuotaProperties(PlaywrightTestingFreeTrialProperties freeTrial = null, PlaywrightTestingOfferingType? offeringType = null, PlaywrightTestingProvisioningState? provisioningState = null) + { + return new PlaywrightTestingQuotaProperties(freeTrial, offeringType, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The Playwright service account id. + /// The free-trial state. + /// A new instance for mocking. + public static PlaywrightTestingFreeTrialProperties PlaywrightTestingFreeTrialProperties(string accountId = null, PlaywrightTestingFreeTrialState state = default) + { + return new PlaywrightTestingFreeTrialProperties(accountId, state, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -22,13 +105,9 @@ public static partial class ArmPlaywrightTestingModelFactory /// The systemData. /// The tags. /// The location. - /// The Playwright testing dashboard URI for the account resource. - /// This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. - /// When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. - /// When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. - /// The status of the last operation. + /// The resource-specific properties for this resource. /// A new instance for mocking. - public static PlaywrightTestingAccountData PlaywrightTestingAccountData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, Uri dashboardUri = null, EnablementStatus? regionalAffinity = null, EnablementStatus? scalableExecution = null, EnablementStatus? reporting = null, PlaywrightTestingProvisioningState? provisioningState = null) + public static PlaywrightTestingAccountData PlaywrightTestingAccountData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, PlaywrightTestingAccountProperties properties = null) { tags ??= new Dictionary(); @@ -39,32 +118,38 @@ public static PlaywrightTestingAccountData PlaywrightTestingAccountData(Resource systemData, tags, location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The Playwright testing dashboard URI for the account resource. + /// This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. + /// When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. + /// When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. + /// When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations. + /// The status of the last operation. + /// A new instance for mocking. + public static PlaywrightTestingAccountProperties PlaywrightTestingAccountProperties(Uri dashboardUri = null, PlaywrightTestingEnablementStatus? regionalAffinity = null, PlaywrightTestingEnablementStatus? scalableExecution = null, PlaywrightTestingEnablementStatus? reporting = null, PlaywrightTestingEnablementStatus? localAuth = null, PlaywrightTestingProvisioningState? provisioningState = null) + { + return new PlaywrightTestingAccountProperties( dashboardUri, regionalAffinity, scalableExecution, reporting, + localAuth, provisioningState, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The free-trial quota. - /// The status of the last operation. - /// A new instance for mocking. - public static PlaywrightTestingQuotaData PlaywrightTestingQuotaData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, FreeTrialProperties freeTrial = null, PlaywrightTestingProvisioningState? provisioningState = null) + /// Initializes a new instance of . + /// Indicates if the resource name is available. + /// The reason why the given name is not available. + /// Detailed reason why the given name is not available. + /// A new instance for mocking. + public static PlaywrightTestingNameAvailabilityResult PlaywrightTestingNameAvailabilityResult(bool? isNameAvailable = null, PlaywrightTestingNameUnavailableReason? reason = null, string message = null) { - return new PlaywrightTestingQuotaData( - id, - name, - resourceType, - systemData, - freeTrial, - provisioningState, - serializedAdditionalRawData: null); + return new PlaywrightTestingNameAvailabilityResult(isNameAvailable, reason, message, serializedAdditionalRawData: null); } } } diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/MockablePlaywrightTestingArmClient.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/MockablePlaywrightTestingArmClient.cs index da51ea0456531..b1963f3e762be 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/MockablePlaywrightTestingArmClient.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/MockablePlaywrightTestingArmClient.cs @@ -57,5 +57,17 @@ public virtual PlaywrightTestingQuotaResource GetPlaywrightTestingQuotaResource( PlaywrightTestingQuotaResource.ValidateResourceId(id); return new PlaywrightTestingQuotaResource(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 PlaywrightTestingAccountQuotaResource GetPlaywrightTestingAccountQuotaResource(ResourceIdentifier id) + { + PlaywrightTestingAccountQuotaResource.ValidateResourceId(id); + return new PlaywrightTestingAccountQuotaResource(Client, id); + } } } diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/MockablePlaywrightTestingResourceGroupResource.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/MockablePlaywrightTestingResourceGroupResource.cs index d57acf34df24d..4da148cf71e2e 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/MockablePlaywrightTestingResourceGroupResource.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/MockablePlaywrightTestingResourceGroupResource.cs @@ -45,15 +45,15 @@ public virtual PlaywrightTestingAccountCollection GetPlaywrightTestingAccounts() /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Get + /// Account_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -61,14 +61,14 @@ public virtual PlaywrightTestingAccountCollection GetPlaywrightTestingAccounts() /// /// /// - /// Name of account. + /// Name of account. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetPlaywrightTestingAccountAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task> GetPlaywrightTestingAccountAsync(string accountName, CancellationToken cancellationToken = default) { - return await GetPlaywrightTestingAccounts().GetAsync(name, cancellationToken).ConfigureAwait(false); + return await GetPlaywrightTestingAccounts().GetAsync(accountName, cancellationToken).ConfigureAwait(false); } /// @@ -76,15 +76,15 @@ public virtual async Task> GetPlaywri /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Get + /// Account_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -92,14 +92,14 @@ public virtual async Task> GetPlaywri /// /// /// - /// Name of account. + /// Name of account. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetPlaywrightTestingAccount(string name, CancellationToken cancellationToken = default) + public virtual Response GetPlaywrightTestingAccount(string accountName, CancellationToken cancellationToken = default) { - return GetPlaywrightTestingAccounts().Get(name, cancellationToken); + return GetPlaywrightTestingAccounts().Get(accountName, cancellationToken); } } } diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/MockablePlaywrightTestingSubscriptionResource.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/MockablePlaywrightTestingSubscriptionResource.cs index ad2be21afbb6e..0d7eb6e75f11a 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/MockablePlaywrightTestingSubscriptionResource.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/MockablePlaywrightTestingSubscriptionResource.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Threading; using System.Threading.Tasks; using Autorest.CSharp.Core; @@ -43,26 +44,28 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// Gets a collection of PlaywrightTestingQuotaResources in the SubscriptionResource. /// The location of quota in ARM Normalized format like eastus, southeastasia etc. + /// is null. + /// is an empty string, and was expected to be non-empty. /// An object representing collection of PlaywrightTestingQuotaResources and their operations over a PlaywrightTestingQuotaResource. - public virtual PlaywrightTestingQuotaCollection GetAllPlaywrightTestingQuota(AzureLocation location) + public virtual PlaywrightTestingQuotaCollection GetAllPlaywrightTestingQuota(string location) { return new PlaywrightTestingQuotaCollection(Client, Id, location); } /// - /// Get quota by name. + /// Get subscription quota by name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{name} + /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} /// /// /// Operation Id - /// Quotas_Get + /// Quota_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -71,28 +74,30 @@ public virtual PlaywrightTestingQuotaCollection GetAllPlaywrightTestingQuota(Azu /// /// /// The location of quota in ARM Normalized format like eastus, southeastasia etc. - /// The quota name. + /// The quota name. /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetPlaywrightTestingQuotaAsync(AzureLocation location, PlaywrightTestingQuotaName name, CancellationToken cancellationToken = default) + public virtual async Task> GetPlaywrightTestingQuotaAsync(string location, PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) { - return await GetAllPlaywrightTestingQuota(location).GetAsync(name, cancellationToken).ConfigureAwait(false); + return await GetAllPlaywrightTestingQuota(location).GetAsync(quotaName, cancellationToken).ConfigureAwait(false); } /// - /// Get quota by name. + /// Get subscription quota by name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{name} + /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} /// /// /// Operation Id - /// Quotas_Get + /// Quota_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -101,12 +106,14 @@ public virtual async Task> GetPlaywrigh /// /// /// The location of quota in ARM Normalized format like eastus, southeastasia etc. - /// The quota name. + /// The quota name. /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetPlaywrightTestingQuota(AzureLocation location, PlaywrightTestingQuotaName name, CancellationToken cancellationToken = default) + public virtual Response GetPlaywrightTestingQuota(string location, PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) { - return GetAllPlaywrightTestingQuota(location).Get(name, cancellationToken); + return GetAllPlaywrightTestingQuota(location).Get(quotaName, cancellationToken); } /// @@ -118,11 +125,11 @@ public virtual Response GetPlaywrightTestingQuot /// /// /// Operation Id - /// Accounts_ListBySubscription + /// Account_ListBySubscription /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -148,11 +155,11 @@ public virtual AsyncPageable GetPlaywrightTest /// /// /// Operation Id - /// Accounts_ListBySubscription + /// Account_ListBySubscription /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -168,5 +175,89 @@ public virtual Pageable GetPlaywrightTestingAc HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => PlaywrightTestingAccountAccountsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PlaywrightTestingAccountResource(Client, PlaywrightTestingAccountData.DeserializePlaywrightTestingAccountData(e)), PlaywrightTestingAccountAccountsClientDiagnostics, Pipeline, "MockablePlaywrightTestingSubscriptionResource.GetPlaywrightTestingAccounts", "value", "nextLink", cancellationToken); } + + /// + /// Adds check global name availability operation, normally used if a resource name must be globally unique. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/checkNameAvailability + /// + /// + /// Operation Id + /// Accounts_CheckPlaywrightTestingNameAvailability + /// + /// + /// Default Api Version + /// 2024-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The CheckAvailability request. + /// The cancellation token to use. + /// is null. + public virtual async Task> CheckPlaywrightTestingNameAvailabilityAsync(PlaywrightTestingNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = PlaywrightTestingAccountAccountsClientDiagnostics.CreateScope("MockablePlaywrightTestingSubscriptionResource.CheckPlaywrightTestingNameAvailability"); + scope.Start(); + try + { + var response = await PlaywrightTestingAccountAccountsRestClient.CheckPlaywrightTestingNameAvailabilityAsync(Id.SubscriptionId, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Adds check global name availability operation, normally used if a resource name must be globally unique. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/checkNameAvailability + /// + /// + /// Operation Id + /// Accounts_CheckPlaywrightTestingNameAvailability + /// + /// + /// Default Api Version + /// 2024-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The CheckAvailability request. + /// The cancellation token to use. + /// is null. + public virtual Response CheckPlaywrightTestingNameAvailability(PlaywrightTestingNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = PlaywrightTestingAccountAccountsClientDiagnostics.CreateScope("MockablePlaywrightTestingSubscriptionResource.CheckPlaywrightTestingNameAvailability"); + scope.Start(); + try + { + var response = PlaywrightTestingAccountAccountsRestClient.CheckPlaywrightTestingNameAvailability(Id.SubscriptionId, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/PlaywrightTestingExtensions.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/PlaywrightTestingExtensions.cs index dbf82f7e308d9..8ac39d8a7c037 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/PlaywrightTestingExtensions.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Extensions/PlaywrightTestingExtensions.cs @@ -71,6 +71,25 @@ public static PlaywrightTestingQuotaResource GetPlaywrightTestingQuotaResource(t return GetMockablePlaywrightTestingArmClient(client).GetPlaywrightTestingQuotaResource(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 PlaywrightTestingAccountQuotaResource GetPlaywrightTestingAccountQuotaResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockablePlaywrightTestingArmClient(client).GetPlaywrightTestingAccountQuotaResource(id); + } + /// /// Gets a collection of PlaywrightTestingAccountResources in the ResourceGroupResource. /// @@ -93,15 +112,15 @@ public static PlaywrightTestingAccountCollection GetPlaywrightTestingAccounts(th /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Get + /// Account_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -114,16 +133,16 @@ public static PlaywrightTestingAccountCollection GetPlaywrightTestingAccounts(th /// /// /// The instance the method will execute against. - /// Name of account. + /// Name of account. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static async Task> GetPlaywrightTestingAccountAsync(this ResourceGroupResource resourceGroupResource, string name, CancellationToken cancellationToken = default) + public static async Task> GetPlaywrightTestingAccountAsync(this ResourceGroupResource resourceGroupResource, string accountName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockablePlaywrightTestingResourceGroupResource(resourceGroupResource).GetPlaywrightTestingAccountAsync(name, cancellationToken).ConfigureAwait(false); + return await GetMockablePlaywrightTestingResourceGroupResource(resourceGroupResource).GetPlaywrightTestingAccountAsync(accountName, cancellationToken).ConfigureAwait(false); } /// @@ -131,15 +150,15 @@ public static async Task> GetPlaywrig /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Get + /// Account_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -152,30 +171,31 @@ public static async Task> GetPlaywrig /// /// /// The instance the method will execute against. - /// Name of account. + /// Name of account. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static Response GetPlaywrightTestingAccount(this ResourceGroupResource resourceGroupResource, string name, CancellationToken cancellationToken = default) + public static Response GetPlaywrightTestingAccount(this ResourceGroupResource resourceGroupResource, string accountName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockablePlaywrightTestingResourceGroupResource(resourceGroupResource).GetPlaywrightTestingAccount(name, cancellationToken); + return GetMockablePlaywrightTestingResourceGroupResource(resourceGroupResource).GetPlaywrightTestingAccount(accountName, cancellationToken); } /// /// Gets a collection of PlaywrightTestingQuotaResources in the SubscriptionResource. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location of quota in ARM Normalized format like eastus, southeastasia etc. - /// is null. + /// or is null. + /// is an empty string, and was expected to be non-empty. /// An object representing collection of PlaywrightTestingQuotaResources and their operations over a PlaywrightTestingQuotaResource. - public static PlaywrightTestingQuotaCollection GetAllPlaywrightTestingQuota(this SubscriptionResource subscriptionResource, AzureLocation location) + public static PlaywrightTestingQuotaCollection GetAllPlaywrightTestingQuota(this SubscriptionResource subscriptionResource, string location) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -183,19 +203,19 @@ public static PlaywrightTestingQuotaCollection GetAllPlaywrightTestingQuota(this } /// - /// Get quota by name. + /// Get subscription quota by name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{name} + /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} /// /// /// Operation Id - /// Quotas_Get + /// Quota_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -204,36 +224,37 @@ public static PlaywrightTestingQuotaCollection GetAllPlaywrightTestingQuota(this /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location of quota in ARM Normalized format like eastus, southeastasia etc. - /// The quota name. + /// The quota name. /// The cancellation token to use. - /// is null. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static async Task> GetPlaywrightTestingQuotaAsync(this SubscriptionResource subscriptionResource, AzureLocation location, PlaywrightTestingQuotaName name, CancellationToken cancellationToken = default) + public static async Task> GetPlaywrightTestingQuotaAsync(this SubscriptionResource subscriptionResource, string location, PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return await GetMockablePlaywrightTestingSubscriptionResource(subscriptionResource).GetPlaywrightTestingQuotaAsync(location, name, cancellationToken).ConfigureAwait(false); + return await GetMockablePlaywrightTestingSubscriptionResource(subscriptionResource).GetPlaywrightTestingQuotaAsync(location, quotaName, cancellationToken).ConfigureAwait(false); } /// - /// Get quota by name. + /// Get subscription quota by name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{name} + /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} /// /// /// Operation Id - /// Quotas_Get + /// Quota_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -242,20 +263,21 @@ public static async Task> GetPlaywright /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location of quota in ARM Normalized format like eastus, southeastasia etc. - /// The quota name. + /// The quota name. /// The cancellation token to use. - /// is null. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static Response GetPlaywrightTestingQuota(this SubscriptionResource subscriptionResource, AzureLocation location, PlaywrightTestingQuotaName name, CancellationToken cancellationToken = default) + public static Response GetPlaywrightTestingQuota(this SubscriptionResource subscriptionResource, string location, PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockablePlaywrightTestingSubscriptionResource(subscriptionResource).GetPlaywrightTestingQuota(location, name, cancellationToken); + return GetMockablePlaywrightTestingSubscriptionResource(subscriptionResource).GetPlaywrightTestingQuota(location, quotaName, cancellationToken); } /// @@ -267,11 +289,11 @@ public static Response GetPlaywrightTestingQuota /// /// /// Operation Id - /// Accounts_ListBySubscription + /// Account_ListBySubscription /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -303,11 +325,11 @@ public static AsyncPageable GetPlaywrightTesti /// /// /// Operation Id - /// Accounts_ListBySubscription + /// Account_ListBySubscription /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -329,5 +351,77 @@ public static Pageable GetPlaywrightTestingAcc return GetMockablePlaywrightTestingSubscriptionResource(subscriptionResource).GetPlaywrightTestingAccounts(cancellationToken); } + + /// + /// Adds check global name availability operation, normally used if a resource name must be globally unique. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/checkNameAvailability + /// + /// + /// Operation Id + /// Accounts_CheckPlaywrightTestingNameAvailability + /// + /// + /// Default Api Version + /// 2024-12-01 + /// + /// + /// 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> CheckPlaywrightTestingNameAvailabilityAsync(this SubscriptionResource subscriptionResource, PlaywrightTestingNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockablePlaywrightTestingSubscriptionResource(subscriptionResource).CheckPlaywrightTestingNameAvailabilityAsync(content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Adds check global name availability operation, normally used if a resource name must be globally unique. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/checkNameAvailability + /// + /// + /// Operation Id + /// Accounts_CheckPlaywrightTestingNameAvailability + /// + /// + /// Default Api Version + /// 2024-12-01 + /// + /// + /// 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 CheckPlaywrightTestingNameAvailability(this SubscriptionResource subscriptionResource, PlaywrightTestingNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockablePlaywrightTestingSubscriptionResource(subscriptionResource).CheckPlaywrightTestingNameAvailability(content, cancellationToken); + } } } diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountQuotaListResult.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountQuotaListResult.Serialization.cs new file mode 100644 index 0000000000000..bf117c5dc69c2 --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountQuotaListResult.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.PlaywrightTesting.Models +{ + internal partial class AccountQuotaListResult : 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(AccountQuotaListResult)} 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AccountQuotaListResult 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(AccountQuotaListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAccountQuotaListResult(document.RootElement, options); + } + + internal static AccountQuotaListResult DeserializeAccountQuotaListResult(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(PlaywrightTestingAccountQuotaData.DeserializePlaywrightTestingAccountQuotaData(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 AccountQuotaListResult(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(AccountQuotaListResult)} does not support writing '{options.Format}' format."); + } + } + + AccountQuotaListResult 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); + return DeserializeAccountQuotaListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AccountQuotaListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountQuotaListResult.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountQuotaListResult.cs new file mode 100644 index 0000000000000..8c0efeb7c87e3 --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountQuotaListResult.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.PlaywrightTesting.Models +{ + /// The response of a AccountQuota list operation. + internal partial class AccountQuotaListResult + { + /// + /// 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 AccountQuota items on this page. + /// is null. + internal AccountQuotaListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The AccountQuota items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal AccountQuotaListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AccountQuotaListResult() + { + } + + /// The AccountQuota items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountUpdateProperties.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountUpdateProperties.Serialization.cs new file mode 100644 index 0000000000000..c0d4db76371ae --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountUpdateProperties.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.PlaywrightTesting.Models +{ + public partial class AccountUpdateProperties : 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(AccountUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(RegionalAffinity)) + { + writer.WritePropertyName("regionalAffinity"u8); + writer.WriteStringValue(RegionalAffinity.Value.ToString()); + } + if (Optional.IsDefined(ScalableExecution)) + { + writer.WritePropertyName("scalableExecution"u8); + writer.WriteStringValue(ScalableExecution.Value.ToString()); + } + if (Optional.IsDefined(Reporting)) + { + writer.WritePropertyName("reporting"u8); + writer.WriteStringValue(Reporting.Value.ToString()); + } + if (Optional.IsDefined(LocalAuth)) + { + writer.WritePropertyName("localAuth"u8); + writer.WriteStringValue(LocalAuth.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AccountUpdateProperties 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(AccountUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAccountUpdateProperties(document.RootElement, options); + } + + internal static AccountUpdateProperties DeserializeAccountUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PlaywrightTestingEnablementStatus? regionalAffinity = default; + PlaywrightTestingEnablementStatus? scalableExecution = default; + PlaywrightTestingEnablementStatus? reporting = default; + PlaywrightTestingEnablementStatus? localAuth = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("regionalAffinity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + regionalAffinity = new PlaywrightTestingEnablementStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("scalableExecution"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scalableExecution = new PlaywrightTestingEnablementStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("reporting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + reporting = new PlaywrightTestingEnablementStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("localAuth"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localAuth = new PlaywrightTestingEnablementStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AccountUpdateProperties(regionalAffinity, scalableExecution, reporting, localAuth, 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(AccountUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + AccountUpdateProperties 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); + return DeserializeAccountUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AccountUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountUpdateProperties.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountUpdateProperties.cs new file mode 100644 index 0000000000000..8b2a1993cff10 --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/AccountUpdateProperties.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.PlaywrightTesting.Models +{ + /// The updatable properties of the Account. + public partial class AccountUpdateProperties + { + /// + /// 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 AccountUpdateProperties() + { + } + + /// Initializes a new instance of . + /// This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. + /// When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. + /// When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. + /// When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations. + /// Keeps track of any properties unknown to the library. + internal AccountUpdateProperties(PlaywrightTestingEnablementStatus? regionalAffinity, PlaywrightTestingEnablementStatus? scalableExecution, PlaywrightTestingEnablementStatus? reporting, PlaywrightTestingEnablementStatus? localAuth, IDictionary serializedAdditionalRawData) + { + RegionalAffinity = regionalAffinity; + ScalableExecution = scalableExecution; + Reporting = reporting; + LocalAuth = localAuth; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. + public PlaywrightTestingEnablementStatus? RegionalAffinity { get; set; } + /// When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. + public PlaywrightTestingEnablementStatus? ScalableExecution { get; set; } + /// When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. + public PlaywrightTestingEnablementStatus? Reporting { get; set; } + /// When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations. + public PlaywrightTestingEnablementStatus? LocalAuth { get; set; } + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/FreeTrialState.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/FreeTrialState.cs deleted file mode 100644 index 135eddf8d678d..0000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/FreeTrialState.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.PlaywrightTesting.Models -{ - /// The free-trial state. - public readonly partial struct FreeTrialState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public FreeTrialState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ActiveValue = "Active"; - private const string ExpiredValue = "Expired"; - - /// The free-trial is Active. - public static FreeTrialState Active { get; } = new FreeTrialState(ActiveValue); - /// The free-trial is Expired. - public static FreeTrialState Expired { get; } = new FreeTrialState(ExpiredValue); - /// Determines if two values are the same. - public static bool operator ==(FreeTrialState left, FreeTrialState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(FreeTrialState left, FreeTrialState right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator FreeTrialState(string value) => new FreeTrialState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is FreeTrialState other && Equals(other); - /// - public bool Equals(FreeTrialState 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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/FreeTrialProperties.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountFreeTrialProperties.Serialization.cs similarity index 65% rename from sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/FreeTrialProperties.Serialization.cs rename to sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountFreeTrialProperties.Serialization.cs index ab625ed5e7dbf..59ab7447dbcac 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/FreeTrialProperties.Serialization.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountFreeTrialProperties.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.PlaywrightTesting.Models { - public partial class FreeTrialProperties : IUtf8JsonSerializable, IJsonModel + public partial class PlaywrightTestingAccountFreeTrialProperties : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,17 +28,12 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri /// 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(FreeTrialProperties)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(PlaywrightTestingAccountFreeTrialProperties)} does not support writing '{format}' format."); } - if (options.Format != "W") - { - writer.WritePropertyName("accountId"u8); - writer.WriteStringValue(AccountId); - } if (options.Format != "W") { writer.WritePropertyName("createdAt"u8); @@ -64,11 +59,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("percentageUsed"u8); writer.WriteNumberValue(PercentageUsed); } - if (options.Format != "W") - { - writer.WritePropertyName("state"u8); - writer.WriteStringValue(State.ToString()); - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -86,19 +76,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - FreeTrialProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + PlaywrightTestingAccountFreeTrialProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(FreeTrialProperties)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(PlaywrightTestingAccountFreeTrialProperties)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeFreeTrialProperties(document.RootElement, options); + return DeserializePlaywrightTestingAccountFreeTrialProperties(document.RootElement, options); } - internal static FreeTrialProperties DeserializeFreeTrialProperties(JsonElement element, ModelReaderWriterOptions options = null) + internal static PlaywrightTestingAccountFreeTrialProperties DeserializePlaywrightTestingAccountFreeTrialProperties(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -106,22 +96,15 @@ internal static FreeTrialProperties DeserializeFreeTrialProperties(JsonElement e { return null; } - string accountId = default; DateTimeOffset createdAt = default; DateTimeOffset expiryAt = default; int allocatedValue = default; int usedValue = default; - decimal percentageUsed = default; - FreeTrialState state = default; + float percentageUsed = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("accountId"u8)) - { - accountId = property.Value.GetString(); - continue; - } if (property.NameEquals("createdAt"u8)) { createdAt = property.Value.GetDateTimeOffset("O"); @@ -144,12 +127,7 @@ internal static FreeTrialProperties DeserializeFreeTrialProperties(JsonElement e } if (property.NameEquals("percentageUsed"u8)) { - percentageUsed = property.Value.GetDecimal(); - continue; - } - if (property.NameEquals("state"u8)) - { - state = new FreeTrialState(property.Value.GetString()); + percentageUsed = property.Value.GetSingle(); continue; } if (options.Format != "W") @@ -158,46 +136,44 @@ internal static FreeTrialProperties DeserializeFreeTrialProperties(JsonElement e } } serializedAdditionalRawData = rawDataDictionary; - return new FreeTrialProperties( - accountId, + return new PlaywrightTestingAccountFreeTrialProperties( createdAt, expiryAt, allocatedValue, usedValue, percentageUsed, - state, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(FreeTrialProperties)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(PlaywrightTestingAccountFreeTrialProperties)} does not support writing '{options.Format}' format."); } } - FreeTrialProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + PlaywrightTestingAccountFreeTrialProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeFreeTrialProperties(document.RootElement, options); + return DeserializePlaywrightTestingAccountFreeTrialProperties(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(FreeTrialProperties)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(PlaywrightTestingAccountFreeTrialProperties)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/FreeTrialProperties.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountFreeTrialProperties.cs similarity index 71% rename from sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/FreeTrialProperties.cs rename to sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountFreeTrialProperties.cs index 6c4070247ce3d..86f31d0312b2f 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/FreeTrialProperties.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountFreeTrialProperties.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.PlaywrightTesting.Models { - /// The free-trial properties. - public partial class FreeTrialProperties + /// The Playwright service account quota resource free-trial properties. + public partial class PlaywrightTestingAccountFreeTrialProperties { /// /// Keeps track of any properties unknown to the library. @@ -45,53 +45,43 @@ public partial class FreeTrialProperties /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - /// The playwright account id. + /// Initializes a new instance of . /// The free-trial createdAt utcDateTime. /// The free-trial expiryAt utcDateTime. /// The free-trial allocated limit value eg. allocated free minutes. /// The free-trial used value eg. used free minutes. /// The free-trial percentage used. - /// The free-trial state. - public FreeTrialProperties(string accountId, DateTimeOffset createdOn, DateTimeOffset expiryOn, int allocatedValue, int usedValue, decimal percentageUsed, FreeTrialState state) + internal PlaywrightTestingAccountFreeTrialProperties(DateTimeOffset createdOn, DateTimeOffset expiryOn, int allocatedValue, int usedValue, float percentageUsed) { - AccountId = accountId; CreatedOn = createdOn; ExpiryOn = expiryOn; AllocatedValue = allocatedValue; UsedValue = usedValue; PercentageUsed = percentageUsed; - State = state; } - /// Initializes a new instance of . - /// The playwright account id. + /// Initializes a new instance of . /// The free-trial createdAt utcDateTime. /// The free-trial expiryAt utcDateTime. /// The free-trial allocated limit value eg. allocated free minutes. /// The free-trial used value eg. used free minutes. /// The free-trial percentage used. - /// The free-trial state. /// Keeps track of any properties unknown to the library. - internal FreeTrialProperties(string accountId, DateTimeOffset createdOn, DateTimeOffset expiryOn, int allocatedValue, int usedValue, decimal percentageUsed, FreeTrialState state, IDictionary serializedAdditionalRawData) + internal PlaywrightTestingAccountFreeTrialProperties(DateTimeOffset createdOn, DateTimeOffset expiryOn, int allocatedValue, int usedValue, float percentageUsed, IDictionary serializedAdditionalRawData) { - AccountId = accountId; CreatedOn = createdOn; ExpiryOn = expiryOn; AllocatedValue = allocatedValue; UsedValue = usedValue; PercentageUsed = percentageUsed; - State = state; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal FreeTrialProperties() + /// Initializes a new instance of for deserialization. + internal PlaywrightTestingAccountFreeTrialProperties() { } - /// The playwright account id. - public string AccountId { get; } /// The free-trial createdAt utcDateTime. public DateTimeOffset CreatedOn { get; } /// The free-trial expiryAt utcDateTime. @@ -101,8 +91,6 @@ internal FreeTrialProperties() /// The free-trial used value eg. used free minutes. public int UsedValue { get; } /// The free-trial percentage used. - public decimal PercentageUsed { get; } - /// The free-trial state. - public FreeTrialState State { get; } + public float PercentageUsed { get; } } } diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountPatch.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountPatch.Serialization.cs index 9b3d510ee3aea..3ed69cd86a57a 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountPatch.Serialization.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountPatch.Serialization.cs @@ -45,24 +45,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndObject(); } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(RegionalAffinity)) - { - writer.WritePropertyName("regionalAffinity"u8); - writer.WriteStringValue(RegionalAffinity.Value.ToString()); - } - if (Optional.IsDefined(ScalableExecution)) - { - writer.WritePropertyName("scalableExecution"u8); - writer.WriteStringValue(ScalableExecution.Value.ToString()); - } - if (Optional.IsDefined(Reporting)) + if (Optional.IsDefined(Properties)) { - writer.WritePropertyName("reporting"u8); - writer.WriteStringValue(Reporting.Value.ToString()); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -101,9 +88,7 @@ internal static PlaywrightTestingAccountPatch DeserializePlaywrightTestingAccoun return null; } IDictionary tags = default; - EnablementStatus? regionalAffinity = default; - EnablementStatus? scalableExecution = default; - EnablementStatus? reporting = default; + AccountUpdateProperties properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -126,39 +111,9 @@ internal static PlaywrightTestingAccountPatch DeserializePlaywrightTestingAccoun { if (property.Value.ValueKind == JsonValueKind.Null) { - property.ThrowNonNullablePropertyIsNull(); continue; } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("regionalAffinity"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - regionalAffinity = new EnablementStatus(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("scalableExecution"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - scalableExecution = new EnablementStatus(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("reporting"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - reporting = new EnablementStatus(property0.Value.GetString()); - continue; - } - } + properties = AccountUpdateProperties.DeserializeAccountUpdateProperties(property.Value, options); continue; } if (options.Format != "W") @@ -167,7 +122,7 @@ internal static PlaywrightTestingAccountPatch DeserializePlaywrightTestingAccoun } } serializedAdditionalRawData = rawDataDictionary; - return new PlaywrightTestingAccountPatch(tags ?? new ChangeTrackingDictionary(), regionalAffinity, scalableExecution, reporting, serializedAdditionalRawData); + return new PlaywrightTestingAccountPatch(tags ?? new ChangeTrackingDictionary(), properties, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountPatch.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountPatch.cs index 246cd663a0fc5..50d60ecf3d4b7 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountPatch.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountPatch.cs @@ -53,26 +53,18 @@ public PlaywrightTestingAccountPatch() /// Initializes a new instance of . /// Resource tags. - /// This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. - /// When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. - /// When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. + /// The resource-specific properties for this resource. /// Keeps track of any properties unknown to the library. - internal PlaywrightTestingAccountPatch(IDictionary tags, EnablementStatus? regionalAffinity, EnablementStatus? scalableExecution, EnablementStatus? reporting, IDictionary serializedAdditionalRawData) + internal PlaywrightTestingAccountPatch(IDictionary tags, AccountUpdateProperties properties, IDictionary serializedAdditionalRawData) { Tags = tags; - RegionalAffinity = regionalAffinity; - ScalableExecution = scalableExecution; - Reporting = reporting; + Properties = properties; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Resource tags. public IDictionary Tags { get; } - /// This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. - public EnablementStatus? RegionalAffinity { get; set; } - /// When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. - public EnablementStatus? ScalableExecution { get; set; } - /// When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. - public EnablementStatus? Reporting { get; set; } + /// The resource-specific properties for this resource. + public AccountUpdateProperties Properties { get; set; } } } diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountProperties.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountProperties.Serialization.cs new file mode 100644 index 0000000000000..d059ece6f8468 --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountProperties.Serialization.cs @@ -0,0 +1,215 @@ +// 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.PlaywrightTesting.Models +{ + public partial class PlaywrightTestingAccountProperties : 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(PlaywrightTestingAccountProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(DashboardUri)) + { + writer.WritePropertyName("dashboardUri"u8); + writer.WriteStringValue(DashboardUri.AbsoluteUri); + } + if (Optional.IsDefined(RegionalAffinity)) + { + writer.WritePropertyName("regionalAffinity"u8); + writer.WriteStringValue(RegionalAffinity.Value.ToString()); + } + if (Optional.IsDefined(ScalableExecution)) + { + writer.WritePropertyName("scalableExecution"u8); + writer.WriteStringValue(ScalableExecution.Value.ToString()); + } + if (Optional.IsDefined(Reporting)) + { + writer.WritePropertyName("reporting"u8); + writer.WriteStringValue(Reporting.Value.ToString()); + } + if (Optional.IsDefined(LocalAuth)) + { + writer.WritePropertyName("localAuth"u8); + writer.WriteStringValue(LocalAuth.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PlaywrightTestingAccountProperties 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(PlaywrightTestingAccountProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePlaywrightTestingAccountProperties(document.RootElement, options); + } + + internal static PlaywrightTestingAccountProperties DeserializePlaywrightTestingAccountProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri dashboardUri = default; + PlaywrightTestingEnablementStatus? regionalAffinity = default; + PlaywrightTestingEnablementStatus? scalableExecution = default; + PlaywrightTestingEnablementStatus? reporting = default; + PlaywrightTestingEnablementStatus? localAuth = default; + PlaywrightTestingProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dashboardUri"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dashboardUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("regionalAffinity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + regionalAffinity = new PlaywrightTestingEnablementStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("scalableExecution"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scalableExecution = new PlaywrightTestingEnablementStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("reporting"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + reporting = new PlaywrightTestingEnablementStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("localAuth"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localAuth = new PlaywrightTestingEnablementStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new PlaywrightTestingProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PlaywrightTestingAccountProperties( + dashboardUri, + regionalAffinity, + scalableExecution, + reporting, + localAuth, + 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(PlaywrightTestingAccountProperties)} does not support writing '{options.Format}' format."); + } + } + + PlaywrightTestingAccountProperties 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); + return DeserializePlaywrightTestingAccountProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PlaywrightTestingAccountProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountProperties.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountProperties.cs new file mode 100644 index 0000000000000..fdb13a694dffe --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountProperties.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.PlaywrightTesting.Models +{ + /// Account resource properties. + public partial class PlaywrightTestingAccountProperties + { + /// + /// 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 PlaywrightTestingAccountProperties() + { + } + + /// Initializes a new instance of . + /// The Playwright testing dashboard URI for the account resource. + /// This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. + /// When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. + /// When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. + /// When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations. + /// The status of the last operation. + /// Keeps track of any properties unknown to the library. + internal PlaywrightTestingAccountProperties(Uri dashboardUri, PlaywrightTestingEnablementStatus? regionalAffinity, PlaywrightTestingEnablementStatus? scalableExecution, PlaywrightTestingEnablementStatus? reporting, PlaywrightTestingEnablementStatus? localAuth, PlaywrightTestingProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + DashboardUri = dashboardUri; + RegionalAffinity = regionalAffinity; + ScalableExecution = scalableExecution; + Reporting = reporting; + LocalAuth = localAuth; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The Playwright testing dashboard URI for the account resource. + public Uri DashboardUri { get; } + /// This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. + public PlaywrightTestingEnablementStatus? RegionalAffinity { get; set; } + /// When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. + public PlaywrightTestingEnablementStatus? ScalableExecution { get; set; } + /// When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. + public PlaywrightTestingEnablementStatus? Reporting { get; set; } + /// When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations. + public PlaywrightTestingEnablementStatus? LocalAuth { get; set; } + /// The status of the last operation. + public PlaywrightTestingProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountQuotaProperties.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountQuotaProperties.Serialization.cs new file mode 100644 index 0000000000000..fb121f4a271b1 --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountQuotaProperties.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.PlaywrightTesting.Models +{ + public partial class PlaywrightTestingAccountQuotaProperties : 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(PlaywrightTestingAccountQuotaProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(FreeTrial)) + { + writer.WritePropertyName("freeTrial"u8); + writer.WriteObjectValue(FreeTrial, options); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PlaywrightTestingAccountQuotaProperties 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(PlaywrightTestingAccountQuotaProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePlaywrightTestingAccountQuotaProperties(document.RootElement, options); + } + + internal static PlaywrightTestingAccountQuotaProperties DeserializePlaywrightTestingAccountQuotaProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PlaywrightTestingAccountFreeTrialProperties freeTrial = default; + PlaywrightTestingProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("freeTrial"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + freeTrial = PlaywrightTestingAccountFreeTrialProperties.DeserializePlaywrightTestingAccountFreeTrialProperties(property.Value, options); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new PlaywrightTestingProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PlaywrightTestingAccountQuotaProperties(freeTrial, 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(PlaywrightTestingAccountQuotaProperties)} does not support writing '{options.Format}' format."); + } + } + + PlaywrightTestingAccountQuotaProperties 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); + return DeserializePlaywrightTestingAccountQuotaProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PlaywrightTestingAccountQuotaProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountQuotaProperties.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountQuotaProperties.cs new file mode 100644 index 0000000000000..2b878b0053c46 --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingAccountQuotaProperties.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.PlaywrightTesting.Models +{ + /// The Playwright service account quota resource properties. + public partial class PlaywrightTestingAccountQuotaProperties + { + /// + /// 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 PlaywrightTestingAccountQuotaProperties() + { + } + + /// Initializes a new instance of . + /// The Playwright service account quota resource free-trial properties. + /// The status of the last operation. + /// Keeps track of any properties unknown to the library. + internal PlaywrightTestingAccountQuotaProperties(PlaywrightTestingAccountFreeTrialProperties freeTrial, PlaywrightTestingProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + FreeTrial = freeTrial; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The Playwright service account quota resource free-trial properties. + public PlaywrightTestingAccountFreeTrialProperties FreeTrial { get; } + /// The status of the last operation. + public PlaywrightTestingProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingEnablementStatus.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingEnablementStatus.cs new file mode 100644 index 0000000000000..e64fdbd20d67a --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingEnablementStatus.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.PlaywrightTesting.Models +{ + /// The enablement status of a feature. + public readonly partial struct PlaywrightTestingEnablementStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PlaywrightTestingEnablementStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// The feature is Enabled. + public static PlaywrightTestingEnablementStatus Enabled { get; } = new PlaywrightTestingEnablementStatus(EnabledValue); + /// The feature is Disabled. + public static PlaywrightTestingEnablementStatus Disabled { get; } = new PlaywrightTestingEnablementStatus(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(PlaywrightTestingEnablementStatus left, PlaywrightTestingEnablementStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PlaywrightTestingEnablementStatus left, PlaywrightTestingEnablementStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PlaywrightTestingEnablementStatus(string value) => new PlaywrightTestingEnablementStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PlaywrightTestingEnablementStatus other && Equals(other); + /// + public bool Equals(PlaywrightTestingEnablementStatus 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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingFreeTrialProperties.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingFreeTrialProperties.Serialization.cs new file mode 100644 index 0000000000000..3bccc11baac6c --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingFreeTrialProperties.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.PlaywrightTesting.Models +{ + public partial class PlaywrightTestingFreeTrialProperties : 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(PlaywrightTestingFreeTrialProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("accountId"u8); + writer.WriteStringValue(AccountId); + } + if (options.Format != "W") + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PlaywrightTestingFreeTrialProperties 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(PlaywrightTestingFreeTrialProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePlaywrightTestingFreeTrialProperties(document.RootElement, options); + } + + internal static PlaywrightTestingFreeTrialProperties DeserializePlaywrightTestingFreeTrialProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string accountId = default; + PlaywrightTestingFreeTrialState state = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("accountId"u8)) + { + accountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + state = new PlaywrightTestingFreeTrialState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PlaywrightTestingFreeTrialProperties(accountId, state, 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(PlaywrightTestingFreeTrialProperties)} does not support writing '{options.Format}' format."); + } + } + + PlaywrightTestingFreeTrialProperties 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); + return DeserializePlaywrightTestingFreeTrialProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PlaywrightTestingFreeTrialProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingFreeTrialProperties.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingFreeTrialProperties.cs new file mode 100644 index 0000000000000..1ab4dc9bc3a3a --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingFreeTrialProperties.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.PlaywrightTesting.Models +{ + /// The subscription quota resource free-trial properties. + public partial class PlaywrightTestingFreeTrialProperties + { + /// + /// 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 Playwright service account id. + /// The free-trial state. + internal PlaywrightTestingFreeTrialProperties(string accountId, PlaywrightTestingFreeTrialState state) + { + AccountId = accountId; + State = state; + } + + /// Initializes a new instance of . + /// The Playwright service account id. + /// The free-trial state. + /// Keeps track of any properties unknown to the library. + internal PlaywrightTestingFreeTrialProperties(string accountId, PlaywrightTestingFreeTrialState state, IDictionary serializedAdditionalRawData) + { + AccountId = accountId; + State = state; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PlaywrightTestingFreeTrialProperties() + { + } + + /// The Playwright service account id. + public string AccountId { get; } + /// The free-trial state. + public PlaywrightTestingFreeTrialState State { get; } + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingFreeTrialState.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingFreeTrialState.cs new file mode 100644 index 0000000000000..237ecd45f2bc5 --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingFreeTrialState.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.PlaywrightTesting.Models +{ + /// The free-trial state. + public readonly partial struct PlaywrightTestingFreeTrialState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PlaywrightTestingFreeTrialState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "Active"; + private const string ExpiredValue = "Expired"; + private const string NotEligibleValue = "NotEligible"; + private const string NotRegisteredValue = "NotRegistered"; + + /// The free-trial is Active. + public static PlaywrightTestingFreeTrialState Active { get; } = new PlaywrightTestingFreeTrialState(ActiveValue); + /// The free-trial is Expired. + public static PlaywrightTestingFreeTrialState Expired { get; } = new PlaywrightTestingFreeTrialState(ExpiredValue); + /// The free-trial is Not Eligible. + public static PlaywrightTestingFreeTrialState NotEligible { get; } = new PlaywrightTestingFreeTrialState(NotEligibleValue); + /// The free-trial is Not Registered. + public static PlaywrightTestingFreeTrialState NotRegistered { get; } = new PlaywrightTestingFreeTrialState(NotRegisteredValue); + /// Determines if two values are the same. + public static bool operator ==(PlaywrightTestingFreeTrialState left, PlaywrightTestingFreeTrialState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PlaywrightTestingFreeTrialState left, PlaywrightTestingFreeTrialState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PlaywrightTestingFreeTrialState(string value) => new PlaywrightTestingFreeTrialState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PlaywrightTestingFreeTrialState other && Equals(other); + /// + public bool Equals(PlaywrightTestingFreeTrialState 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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityContent.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityContent.Serialization.cs new file mode 100644 index 0000000000000..3f935bfd926fc --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityContent.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.PlaywrightTesting.Models +{ + public partial class PlaywrightTestingNameAvailabilityContent : 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(PlaywrightTestingNameAvailabilityContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PlaywrightTestingNameAvailabilityContent 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(PlaywrightTestingNameAvailabilityContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePlaywrightTestingNameAvailabilityContent(document.RootElement, options); + } + + internal static PlaywrightTestingNameAvailabilityContent DeserializePlaywrightTestingNameAvailabilityContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string 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 = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PlaywrightTestingNameAvailabilityContent(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(PlaywrightTestingNameAvailabilityContent)} does not support writing '{options.Format}' format."); + } + } + + PlaywrightTestingNameAvailabilityContent 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); + return DeserializePlaywrightTestingNameAvailabilityContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PlaywrightTestingNameAvailabilityContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityContent.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityContent.cs new file mode 100644 index 0000000000000..ef3463181fe12 --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityContent.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.PlaywrightTesting.Models +{ + /// The check availability request body. + public partial class PlaywrightTestingNameAvailabilityContent + { + /// + /// 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 PlaywrightTestingNameAvailabilityContent() + { + } + + /// Initializes a new instance of . + /// The name of the resource for which availability needs to be checked. + /// The resource type. + /// Keeps track of any properties unknown to the library. + internal PlaywrightTestingNameAvailabilityContent(string name, string type, IDictionary serializedAdditionalRawData) + { + Name = name; + Type = type; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the resource for which availability needs to be checked. + public string Name { get; set; } + /// The resource type. + public string Type { get; set; } + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityResult.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityResult.Serialization.cs new file mode 100644 index 0000000000000..5a1f16cbc1bf8 --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityResult.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.PlaywrightTesting.Models +{ + public partial class PlaywrightTestingNameAvailabilityResult : 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(PlaywrightTestingNameAvailabilityResult)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsNameAvailable)) + { + writer.WritePropertyName("nameAvailable"u8); + writer.WriteBooleanValue(IsNameAvailable.Value); + } + if (Optional.IsDefined(Reason)) + { + writer.WritePropertyName("reason"u8); + writer.WriteStringValue(Reason.Value.ToString()); + } + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + 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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PlaywrightTestingNameAvailabilityResult 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(PlaywrightTestingNameAvailabilityResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePlaywrightTestingNameAvailabilityResult(document.RootElement, options); + } + + internal static PlaywrightTestingNameAvailabilityResult DeserializePlaywrightTestingNameAvailabilityResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? nameAvailable = default; + PlaywrightTestingNameUnavailableReason? reason = default; + string message = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nameAvailable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nameAvailable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("reason"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + reason = new PlaywrightTestingNameUnavailableReason(property.Value.GetString()); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PlaywrightTestingNameAvailabilityResult(nameAvailable, reason, message, 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(PlaywrightTestingNameAvailabilityResult)} does not support writing '{options.Format}' format."); + } + } + + PlaywrightTestingNameAvailabilityResult 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); + return DeserializePlaywrightTestingNameAvailabilityResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PlaywrightTestingNameAvailabilityResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityResult.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityResult.cs new file mode 100644 index 0000000000000..8e825a386490e --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameAvailabilityResult.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.PlaywrightTesting.Models +{ + /// The check availability result. + public partial class PlaywrightTestingNameAvailabilityResult + { + /// + /// 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 PlaywrightTestingNameAvailabilityResult() + { + } + + /// Initializes a new instance of . + /// Indicates if the resource name is available. + /// The reason why the given name is not available. + /// Detailed reason why the given name is not available. + /// Keeps track of any properties unknown to the library. + internal PlaywrightTestingNameAvailabilityResult(bool? isNameAvailable, PlaywrightTestingNameUnavailableReason? reason, string message, IDictionary serializedAdditionalRawData) + { + IsNameAvailable = isNameAvailable; + Reason = reason; + Message = message; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Indicates if the resource name is available. + public bool? IsNameAvailable { get; } + /// The reason why the given name is not available. + public PlaywrightTestingNameUnavailableReason? Reason { get; } + /// Detailed reason why the given name is not available. + public string Message { get; } + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameUnavailableReason.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameUnavailableReason.cs new file mode 100644 index 0000000000000..26b72b8497cb4 --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingNameUnavailableReason.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.PlaywrightTesting.Models +{ + /// Possible reasons for a name not being available. + public readonly partial struct PlaywrightTestingNameUnavailableReason : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PlaywrightTestingNameUnavailableReason(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InvalidValue = "Invalid"; + private const string AlreadyExistsValue = "AlreadyExists"; + + /// Name is invalid. + public static PlaywrightTestingNameUnavailableReason Invalid { get; } = new PlaywrightTestingNameUnavailableReason(InvalidValue); + /// Name already exists. + public static PlaywrightTestingNameUnavailableReason AlreadyExists { get; } = new PlaywrightTestingNameUnavailableReason(AlreadyExistsValue); + /// Determines if two values are the same. + public static bool operator ==(PlaywrightTestingNameUnavailableReason left, PlaywrightTestingNameUnavailableReason right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PlaywrightTestingNameUnavailableReason left, PlaywrightTestingNameUnavailableReason right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PlaywrightTestingNameUnavailableReason(string value) => new PlaywrightTestingNameUnavailableReason(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PlaywrightTestingNameUnavailableReason other && Equals(other); + /// + public bool Equals(PlaywrightTestingNameUnavailableReason 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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingOfferingType.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingOfferingType.cs new file mode 100644 index 0000000000000..fa2c55e8dcecb --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingOfferingType.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.PlaywrightTesting.Models +{ + /// Offering type state. + public readonly partial struct PlaywrightTestingOfferingType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PlaywrightTestingOfferingType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotApplicableValue = "NotApplicable"; + private const string PrivatePreviewValue = "PrivatePreview"; + private const string PublicPreviewValue = "PublicPreview"; + private const string GeneralAvailabilityValue = "GeneralAvailability"; + + /// The offeringType is NotApplicable. + public static PlaywrightTestingOfferingType NotApplicable { get; } = new PlaywrightTestingOfferingType(NotApplicableValue); + /// The offeringType is PrivatePreview. + public static PlaywrightTestingOfferingType PrivatePreview { get; } = new PlaywrightTestingOfferingType(PrivatePreviewValue); + /// The offeringType is PublicPreview. + public static PlaywrightTestingOfferingType PublicPreview { get; } = new PlaywrightTestingOfferingType(PublicPreviewValue); + /// The offeringType is GeneralAvailability. + public static PlaywrightTestingOfferingType GeneralAvailability { get; } = new PlaywrightTestingOfferingType(GeneralAvailabilityValue); + /// Determines if two values are the same. + public static bool operator ==(PlaywrightTestingOfferingType left, PlaywrightTestingOfferingType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PlaywrightTestingOfferingType left, PlaywrightTestingOfferingType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PlaywrightTestingOfferingType(string value) => new PlaywrightTestingOfferingType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PlaywrightTestingOfferingType other && Equals(other); + /// + public bool Equals(PlaywrightTestingOfferingType 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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingProvisioningState.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingProvisioningState.cs index 2e47e5a29821a..ef32459a5c553 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingProvisioningState.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingProvisioningState.cs @@ -25,6 +25,7 @@ public PlaywrightTestingProvisioningState(string value) private const string SucceededValue = "Succeeded"; private const string FailedValue = "Failed"; private const string CanceledValue = "Canceled"; + private const string CreatingValue = "Creating"; private const string DeletingValue = "Deleting"; private const string AcceptedValue = "Accepted"; @@ -34,9 +35,11 @@ public PlaywrightTestingProvisioningState(string value) public static PlaywrightTestingProvisioningState Failed { get; } = new PlaywrightTestingProvisioningState(FailedValue); /// Resource creation was canceled. public static PlaywrightTestingProvisioningState Canceled { get; } = new PlaywrightTestingProvisioningState(CanceledValue); - /// Deletion in progress. + /// Creation in progress.. + public static PlaywrightTestingProvisioningState Creating { get; } = new PlaywrightTestingProvisioningState(CreatingValue); + /// Deletion in progress.. public static PlaywrightTestingProvisioningState Deleting { get; } = new PlaywrightTestingProvisioningState(DeletingValue); - /// Change accepted for processing. + /// Change accepted for processing.. public static PlaywrightTestingProvisioningState Accepted { get; } = new PlaywrightTestingProvisioningState(AcceptedValue); /// Determines if two values are the same. public static bool operator ==(PlaywrightTestingProvisioningState left, PlaywrightTestingProvisioningState right) => left.Equals(right); diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingQuotaName.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingQuotaName.cs index ec70470da0d03..6c80598cdb8a6 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingQuotaName.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingQuotaName.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.PlaywrightTesting.Models { - /// The PlaywrightTestingQuotaName. + /// The enum for quota name. public readonly partial struct PlaywrightTestingQuotaName : IEquatable { private readonly string _value; @@ -23,9 +23,12 @@ public PlaywrightTestingQuotaName(string value) } private const string ScalableExecutionValue = "ScalableExecution"; + private const string ReportingValue = "Reporting"; /// The quota details for scalable execution feature. When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. public static PlaywrightTestingQuotaName ScalableExecution { get; } = new PlaywrightTestingQuotaName(ScalableExecutionValue); + /// The quota details for reporting feature. When enabled, Playwright client will be able to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. + public static PlaywrightTestingQuotaName Reporting { get; } = new PlaywrightTestingQuotaName(ReportingValue); /// Determines if two values are the same. public static bool operator ==(PlaywrightTestingQuotaName left, PlaywrightTestingQuotaName right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingQuotaProperties.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingQuotaProperties.Serialization.cs new file mode 100644 index 0000000000000..a48fbf1ed9f45 --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingQuotaProperties.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.PlaywrightTesting.Models +{ + public partial class PlaywrightTestingQuotaProperties : 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(PlaywrightTestingQuotaProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(FreeTrial)) + { + writer.WritePropertyName("freeTrial"u8); + writer.WriteObjectValue(FreeTrial, options); + } + if (options.Format != "W" && Optional.IsDefined(OfferingType)) + { + writer.WritePropertyName("offeringType"u8); + writer.WriteStringValue(OfferingType.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)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PlaywrightTestingQuotaProperties 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(PlaywrightTestingQuotaProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePlaywrightTestingQuotaProperties(document.RootElement, options); + } + + internal static PlaywrightTestingQuotaProperties DeserializePlaywrightTestingQuotaProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PlaywrightTestingFreeTrialProperties freeTrial = default; + PlaywrightTestingOfferingType? offeringType = default; + PlaywrightTestingProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("freeTrial"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + freeTrial = PlaywrightTestingFreeTrialProperties.DeserializePlaywrightTestingFreeTrialProperties(property.Value, options); + continue; + } + if (property.NameEquals("offeringType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + offeringType = new PlaywrightTestingOfferingType(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new PlaywrightTestingProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PlaywrightTestingQuotaProperties(freeTrial, offeringType, 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(PlaywrightTestingQuotaProperties)} does not support writing '{options.Format}' format."); + } + } + + PlaywrightTestingQuotaProperties 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); + return DeserializePlaywrightTestingQuotaProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PlaywrightTestingQuotaProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingQuotaProperties.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingQuotaProperties.cs new file mode 100644 index 0000000000000..79c32aa776602 --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/Models/PlaywrightTestingQuotaProperties.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.PlaywrightTesting.Models +{ + /// The subscription quota resource properties. + public partial class PlaywrightTestingQuotaProperties + { + /// + /// 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 PlaywrightTestingQuotaProperties() + { + } + + /// Initializes a new instance of . + /// The subscription quota resource free-trial properties. + /// Indicates the offering type for the subscription. + /// The status of the last operation. + /// Keeps track of any properties unknown to the library. + internal PlaywrightTestingQuotaProperties(PlaywrightTestingFreeTrialProperties freeTrial, PlaywrightTestingOfferingType? offeringType, PlaywrightTestingProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + FreeTrial = freeTrial; + OfferingType = offeringType; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The subscription quota resource free-trial properties. + public PlaywrightTestingFreeTrialProperties FreeTrial { get; } + /// Indicates the offering type for the subscription. + public PlaywrightTestingOfferingType? OfferingType { get; } + /// The status of the last operation. + public PlaywrightTestingProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountCollection.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountCollection.cs index a8972bf5fbf59..0f30335e26c22 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountCollection.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountCollection.cs @@ -57,15 +57,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_CreateOrUpdate + /// Account_CreateOrUpdate /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -74,22 +74,22 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the 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 account. + /// Name of account. /// 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 name, PlaywrightTestingAccountData data, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string accountName, PlaywrightTestingAccountData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); Argument.AssertNotNull(data, nameof(data)); using var scope = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _playwrightTestingAccountAccountsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, name, data, cancellationToken).ConfigureAwait(false); - var operation = new PlaywrightTestingArmOperation(new PlaywrightTestingAccountOperationSource(Client), _playwrightTestingAccountAccountsClientDiagnostics, Pipeline, _playwrightTestingAccountAccountsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _playwrightTestingAccountAccountsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, accountName, data, cancellationToken).ConfigureAwait(false); + var operation = new PlaywrightTestingArmOperation(new PlaywrightTestingAccountOperationSource(Client), _playwrightTestingAccountAccountsClientDiagnostics, Pipeline, _playwrightTestingAccountAccountsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, accountName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -106,15 +106,15 @@ public virtual async Task> Create /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_CreateOrUpdate + /// Account_CreateOrUpdate /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -123,22 +123,22 @@ public virtual async Task> Create /// /// /// if the method should wait to return until the long-running operation has completed on the 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 account. + /// Name of account. /// 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 name, PlaywrightTestingAccountData data, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string accountName, PlaywrightTestingAccountData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); Argument.AssertNotNull(data, nameof(data)); using var scope = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountCollection.CreateOrUpdate"); scope.Start(); try { - var response = _playwrightTestingAccountAccountsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, name, data, cancellationToken); - var operation = new PlaywrightTestingArmOperation(new PlaywrightTestingAccountOperationSource(Client), _playwrightTestingAccountAccountsClientDiagnostics, Pipeline, _playwrightTestingAccountAccountsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _playwrightTestingAccountAccountsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, accountName, data, cancellationToken); + var operation = new PlaywrightTestingArmOperation(new PlaywrightTestingAccountOperationSource(Client), _playwrightTestingAccountAccountsClientDiagnostics, Pipeline, _playwrightTestingAccountAccountsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, accountName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -155,15 +155,15 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Get + /// Account_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -171,19 +171,19 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// - /// Name of account. + /// Name of account. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string accountName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); using var scope = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountCollection.Get"); scope.Start(); try { - var response = await _playwrightTestingAccountAccountsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, name, cancellationToken).ConfigureAwait(false); + var response = await _playwrightTestingAccountAccountsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, accountName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new PlaywrightTestingAccountResource(Client, response.Value), response.GetRawResponse()); @@ -200,15 +200,15 @@ public virtual async Task> GetAsync(s /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Get + /// Account_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -216,19 +216,19 @@ public virtual async Task> GetAsync(s /// /// /// - /// Name of account. + /// Name of account. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string name, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string accountName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); using var scope = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountCollection.Get"); scope.Start(); try { - var response = _playwrightTestingAccountAccountsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, name, cancellationToken); + var response = _playwrightTestingAccountAccountsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, accountName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new PlaywrightTestingAccountResource(Client, response.Value), response.GetRawResponse()); @@ -249,11 +249,11 @@ public virtual Response Get(string name, Cance /// /// /// Operation Id - /// Accounts_ListByResourceGroup + /// Account_ListByResourceGroup /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -279,11 +279,11 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Operation Id - /// Accounts_ListByResourceGroup + /// Account_ListByResourceGroup /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -305,15 +305,15 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Get + /// Account_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -321,19 +321,19 @@ public virtual Pageable GetAll(CancellationTok /// /// /// - /// Name of account. + /// Name of account. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string accountName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); using var scope = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountCollection.Exists"); scope.Start(); try { - var response = await _playwrightTestingAccountAccountsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, name, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _playwrightTestingAccountAccountsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, accountName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -348,15 +348,15 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Get + /// Account_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -364,19 +364,19 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// - /// Name of account. + /// Name of account. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string name, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string accountName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); using var scope = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountCollection.Exists"); scope.Start(); try { - var response = _playwrightTestingAccountAccountsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, name, cancellationToken: cancellationToken); + var response = _playwrightTestingAccountAccountsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, accountName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -391,15 +391,15 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Get + /// Account_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -407,19 +407,19 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// - /// Name of account. + /// Name of account. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string name, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string accountName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); using var scope = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountCollection.GetIfExists"); scope.Start(); try { - var response = await _playwrightTestingAccountAccountsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, name, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _playwrightTestingAccountAccountsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, accountName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new PlaywrightTestingAccountResource(Client, response.Value), response.GetRawResponse()); @@ -436,15 +436,15 @@ public virtual async Task> Ge /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Get + /// Account_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -452,19 +452,19 @@ public virtual async Task> Ge /// /// /// - /// Name of account. + /// Name of account. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string name, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string accountName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); using var scope = _playwrightTestingAccountAccountsClientDiagnostics.CreateScope("PlaywrightTestingAccountCollection.GetIfExists"); scope.Start(); try { - var response = _playwrightTestingAccountAccountsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, name, cancellationToken: cancellationToken); + var response = _playwrightTestingAccountAccountsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, accountName, cancellationToken: cancellationToken); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new PlaywrightTestingAccountResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountData.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountData.Serialization.cs index 060b4ff212bc4..5aa13413d2e77 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountData.Serialization.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountData.Serialization.cs @@ -37,34 +37,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(DashboardUri)) - { - writer.WritePropertyName("dashboardUri"u8); - writer.WriteStringValue(DashboardUri.AbsoluteUri); - } - if (Optional.IsDefined(RegionalAffinity)) - { - writer.WritePropertyName("regionalAffinity"u8); - writer.WriteStringValue(RegionalAffinity.Value.ToString()); - } - if (Optional.IsDefined(ScalableExecution)) - { - writer.WritePropertyName("scalableExecution"u8); - writer.WriteStringValue(ScalableExecution.Value.ToString()); - } - if (Optional.IsDefined(Reporting)) + if (Optional.IsDefined(Properties)) { - writer.WritePropertyName("reporting"u8); - writer.WriteStringValue(Reporting.Value.ToString()); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - writer.WriteEndObject(); } PlaywrightTestingAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -87,21 +64,26 @@ internal static PlaywrightTestingAccountData DeserializePlaywrightTestingAccount { return null; } + PlaywrightTestingAccountProperties properties = default; IDictionary tags = default; AzureLocation location = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; - Uri dashboardUri = default; - EnablementStatus? regionalAffinity = default; - EnablementStatus? scalableExecution = default; - EnablementStatus? reporting = default; - PlaywrightTestingProvisioningState? provisioningState = 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 = PlaywrightTestingAccountProperties.DeserializePlaywrightTestingAccountProperties(property.Value, options); + continue; + } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -145,63 +127,6 @@ internal static PlaywrightTestingAccountData DeserializePlaywrightTestingAccount systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("dashboardUri"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dashboardUri = new Uri(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("regionalAffinity"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - regionalAffinity = new EnablementStatus(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("scalableExecution"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - scalableExecution = new EnablementStatus(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("reporting"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - reporting = new EnablementStatus(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("provisioningState"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new PlaywrightTestingProvisioningState(property0.Value.GetString()); - continue; - } - } - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -215,11 +140,7 @@ internal static PlaywrightTestingAccountData DeserializePlaywrightTestingAccount systemData, tags ?? new ChangeTrackingDictionary(), location, - dashboardUri, - regionalAffinity, - scalableExecution, - reporting, - provisioningState, + properties, serializedAdditionalRawData); } diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountData.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountData.cs index a52fd81e34f60..599008a12c6af 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountData.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountData.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.PlaywrightTesting { /// /// A class representing the PlaywrightTestingAccount data model. - /// An account resource + /// A Playwright service account resource. /// public partial class PlaywrightTestingAccountData : TrackedResourceData { @@ -64,19 +64,11 @@ public PlaywrightTestingAccountData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// The Playwright testing dashboard URI for the account resource. - /// This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. - /// When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. - /// When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. - /// The status of the last operation. + /// The resource-specific properties for this resource. /// Keeps track of any properties unknown to the library. - internal PlaywrightTestingAccountData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, Uri dashboardUri, EnablementStatus? regionalAffinity, EnablementStatus? scalableExecution, EnablementStatus? reporting, PlaywrightTestingProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal PlaywrightTestingAccountData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, PlaywrightTestingAccountProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { - DashboardUri = dashboardUri; - RegionalAffinity = regionalAffinity; - ScalableExecution = scalableExecution; - Reporting = reporting; - ProvisioningState = provisioningState; + Properties = properties; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -85,15 +77,7 @@ internal PlaywrightTestingAccountData() { } - /// The Playwright testing dashboard URI for the account resource. - public Uri DashboardUri { get; } - /// This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created. - public EnablementStatus? RegionalAffinity { get; set; } - /// When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations. - public EnablementStatus? ScalableExecution { get; set; } - /// When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting. - public EnablementStatus? Reporting { get; set; } - /// The status of the last operation. - public PlaywrightTestingProvisioningState? ProvisioningState { get; } + /// The resource-specific properties for this resource. + public PlaywrightTestingAccountProperties Properties { get; set; } } } diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaCollection.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaCollection.cs new file mode 100644 index 0000000000000..2f561bc56cbda --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaCollection.cs @@ -0,0 +1,372 @@ +// 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.PlaywrightTesting.Models; + +namespace Azure.ResourceManager.PlaywrightTesting +{ + /// + /// 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 GetPlaywrightTestingAccountQuotas method from an instance of . + /// + public partial class PlaywrightTestingAccountQuotaCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics; + private readonly AccountQuotasRestOperations _playwrightTestingAccountQuotaAccountQuotasRestClient; + + /// Initializes a new instance of the class for mocking. + protected PlaywrightTestingAccountQuotaCollection() + { + } + + /// 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 PlaywrightTestingAccountQuotaCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PlaywrightTesting", PlaywrightTestingAccountQuotaResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(PlaywrightTestingAccountQuotaResource.ResourceType, out string playwrightTestingAccountQuotaAccountQuotasApiVersion); + _playwrightTestingAccountQuotaAccountQuotasRestClient = new AccountQuotasRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, playwrightTestingAccountQuotaAccountQuotasApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != PlaywrightTestingAccountResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, PlaywrightTestingAccountResource.ResourceType), nameof(id)); + } + + /// + /// Get quota by name for an account. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName} + /// + /// + /// Operation Id + /// AccountQuota_Get + /// + /// + /// Default Api Version + /// 2024-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The Playwright service account quota name. + /// The cancellation token to use. + public virtual async Task> GetAsync(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) + { + using var scope = _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics.CreateScope("PlaywrightTestingAccountQuotaCollection.Get"); + scope.Start(); + try + { + var response = await _playwrightTestingAccountQuotaAccountQuotasRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, quotaName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PlaywrightTestingAccountQuotaResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get quota by name for an account. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName} + /// + /// + /// Operation Id + /// AccountQuota_Get + /// + /// + /// Default Api Version + /// 2024-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The Playwright service account quota name. + /// The cancellation token to use. + public virtual Response Get(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) + { + using var scope = _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics.CreateScope("PlaywrightTestingAccountQuotaCollection.Get"); + scope.Start(); + try + { + var response = _playwrightTestingAccountQuotaAccountQuotasRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, quotaName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PlaywrightTestingAccountQuotaResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List quotas for a given account. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas + /// + /// + /// Operation Id + /// AccountQuota_ListByAccount + /// + /// + /// Default Api Version + /// 2024-12-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) => _playwrightTestingAccountQuotaAccountQuotasRestClient.CreateListByAccountRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _playwrightTestingAccountQuotaAccountQuotasRestClient.CreateListByAccountNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PlaywrightTestingAccountQuotaResource(Client, PlaywrightTestingAccountQuotaData.DeserializePlaywrightTestingAccountQuotaData(e)), _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics, Pipeline, "PlaywrightTestingAccountQuotaCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List quotas for a given account. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas + /// + /// + /// Operation Id + /// AccountQuota_ListByAccount + /// + /// + /// Default Api Version + /// 2024-12-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) => _playwrightTestingAccountQuotaAccountQuotasRestClient.CreateListByAccountRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _playwrightTestingAccountQuotaAccountQuotasRestClient.CreateListByAccountNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PlaywrightTestingAccountQuotaResource(Client, PlaywrightTestingAccountQuotaData.DeserializePlaywrightTestingAccountQuotaData(e)), _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics, Pipeline, "PlaywrightTestingAccountQuotaCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName} + /// + /// + /// Operation Id + /// AccountQuota_Get + /// + /// + /// Default Api Version + /// 2024-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The Playwright service account quota name. + /// The cancellation token to use. + public virtual async Task> ExistsAsync(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) + { + using var scope = _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics.CreateScope("PlaywrightTestingAccountQuotaCollection.Exists"); + scope.Start(); + try + { + var response = await _playwrightTestingAccountQuotaAccountQuotasRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, quotaName, 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.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName} + /// + /// + /// Operation Id + /// AccountQuota_Get + /// + /// + /// Default Api Version + /// 2024-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The Playwright service account quota name. + /// The cancellation token to use. + public virtual Response Exists(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) + { + using var scope = _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics.CreateScope("PlaywrightTestingAccountQuotaCollection.Exists"); + scope.Start(); + try + { + var response = _playwrightTestingAccountQuotaAccountQuotasRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, quotaName, 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.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName} + /// + /// + /// Operation Id + /// AccountQuota_Get + /// + /// + /// Default Api Version + /// 2024-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The Playwright service account quota name. + /// The cancellation token to use. + public virtual async Task> GetIfExistsAsync(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) + { + using var scope = _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics.CreateScope("PlaywrightTestingAccountQuotaCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _playwrightTestingAccountQuotaAccountQuotasRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, quotaName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PlaywrightTestingAccountQuotaResource(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.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName} + /// + /// + /// Operation Id + /// AccountQuota_Get + /// + /// + /// Default Api Version + /// 2024-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The Playwright service account quota name. + /// The cancellation token to use. + public virtual NullableResponse GetIfExists(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) + { + using var scope = _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics.CreateScope("PlaywrightTestingAccountQuotaCollection.GetIfExists"); + scope.Start(); + try + { + var response = _playwrightTestingAccountQuotaAccountQuotasRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, quotaName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PlaywrightTestingAccountQuotaResource(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/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaData.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaData.Serialization.cs new file mode 100644 index 0000000000000..1413bf1aa4d3a --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaData.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.PlaywrightTesting.Models; + +namespace Azure.ResourceManager.PlaywrightTesting +{ + public partial class PlaywrightTestingAccountQuotaData : 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(PlaywrightTestingAccountQuotaData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + PlaywrightTestingAccountQuotaData 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(PlaywrightTestingAccountQuotaData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePlaywrightTestingAccountQuotaData(document.RootElement, options); + } + + internal static PlaywrightTestingAccountQuotaData DeserializePlaywrightTestingAccountQuotaData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PlaywrightTestingAccountQuotaProperties 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 = PlaywrightTestingAccountQuotaProperties.DeserializePlaywrightTestingAccountQuotaProperties(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 PlaywrightTestingAccountQuotaData( + 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(PlaywrightTestingAccountQuotaData)} does not support writing '{options.Format}' format."); + } + } + + PlaywrightTestingAccountQuotaData 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); + return DeserializePlaywrightTestingAccountQuotaData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PlaywrightTestingAccountQuotaData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaData.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaData.cs new file mode 100644 index 0000000000000..2c978269e3d3d --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaData.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.PlaywrightTesting.Models; + +namespace Azure.ResourceManager.PlaywrightTesting +{ + /// + /// A class representing the PlaywrightTestingAccountQuota data model. + /// A quota resource for a Playwright service account. + /// + public partial class PlaywrightTestingAccountQuotaData : 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 PlaywrightTestingAccountQuotaData() + { + } + + /// 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 PlaywrightTestingAccountQuotaData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, PlaywrightTestingAccountQuotaProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public PlaywrightTestingAccountQuotaProperties Properties { get; } + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaResource.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaResource.Serialization.cs new file mode 100644 index 0000000000000..82d6080bcc56b --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaResource.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.PlaywrightTesting +{ + public partial class PlaywrightTestingAccountQuotaResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + PlaywrightTestingAccountQuotaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + PlaywrightTestingAccountQuotaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaResource.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaResource.cs new file mode 100644 index 0000000000000..122f15bb738b7 --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaResource.cs @@ -0,0 +1,172 @@ +// 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.PlaywrightTesting.Models; + +namespace Azure.ResourceManager.PlaywrightTesting +{ + /// + /// A Class representing a PlaywrightTestingAccountQuota 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 GetPlaywrightTestingAccountQuotaResource method. + /// Otherwise you can get one from its parent resource using the GetPlaywrightTestingAccountQuota method. + /// + public partial class PlaywrightTestingAccountQuotaResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The accountName. + /// The quotaName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName, PlaywrightTestingQuotaName quotaName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics; + private readonly AccountQuotasRestOperations _playwrightTestingAccountQuotaAccountQuotasRestClient; + private readonly PlaywrightTestingAccountQuotaData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.AzurePlaywrightService/accounts/quotas"; + + /// Initializes a new instance of the class for mocking. + protected PlaywrightTestingAccountQuotaResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal PlaywrightTestingAccountQuotaResource(ArmClient client, PlaywrightTestingAccountQuotaData 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 PlaywrightTestingAccountQuotaResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PlaywrightTesting", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string playwrightTestingAccountQuotaAccountQuotasApiVersion); + _playwrightTestingAccountQuotaAccountQuotasRestClient = new AccountQuotasRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, playwrightTestingAccountQuotaAccountQuotasApiVersion); +#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 PlaywrightTestingAccountQuotaData 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 quota by name for an account. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName} + /// + /// + /// Operation Id + /// AccountQuota_Get + /// + /// + /// Default Api Version + /// 2024-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics.CreateScope("PlaywrightTestingAccountQuotaResource.Get"); + scope.Start(); + try + { + var response = await _playwrightTestingAccountQuotaAccountQuotasRestClient.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 PlaywrightTestingAccountQuotaResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get quota by name for an account. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName} + /// + /// + /// Operation Id + /// AccountQuota_Get + /// + /// + /// Default Api Version + /// 2024-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _playwrightTestingAccountQuotaAccountQuotasClientDiagnostics.CreateScope("PlaywrightTestingAccountQuotaResource.Get"); + scope.Start(); + try + { + var response = _playwrightTestingAccountQuotaAccountQuotasRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PlaywrightTestingAccountQuotaResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountResource.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountResource.cs index c0142b77e95d9..0b9bdec6c3ad4 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountResource.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountResource.cs @@ -28,10 +28,10 @@ public partial class PlaywrightTestingAccountResource : ArmResource /// Generate the resource identifier of a instance. /// The subscriptionId. /// The resourceGroupName. - /// The name. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string name) + /// The accountName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string accountName) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}"; return new ResourceIdentifier(resourceId); } @@ -90,20 +90,85 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } + /// Gets a collection of PlaywrightTestingAccountQuotaResources in the PlaywrightTestingAccount. + /// An object representing collection of PlaywrightTestingAccountQuotaResources and their operations over a PlaywrightTestingAccountQuotaResource. + public virtual PlaywrightTestingAccountQuotaCollection GetAllPlaywrightTestingAccountQuota() + { + return GetCachedClient(client => new PlaywrightTestingAccountQuotaCollection(client, Id)); + } + + /// + /// Get quota by name for an account. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName} + /// + /// + /// Operation Id + /// AccountQuota_Get + /// + /// + /// Default Api Version + /// 2024-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The Playwright service account quota name. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual async Task> GetPlaywrightTestingAccountQuotaAsync(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) + { + return await GetAllPlaywrightTestingAccountQuota().GetAsync(quotaName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get quota by name for an account. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName} + /// + /// + /// Operation Id + /// AccountQuota_Get + /// + /// + /// Default Api Version + /// 2024-12-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The Playwright service account quota name. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual Response GetPlaywrightTestingAccountQuota(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) + { + return GetAllPlaywrightTestingAccountQuota().Get(quotaName, cancellationToken); + } + /// /// Get a Account /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Get + /// Account_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -135,15 +200,15 @@ public virtual async Task> GetAsync(C /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Get + /// Account_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -175,15 +240,15 @@ public virtual Response Get(CancellationToken /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Delete + /// Account_Delete /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -217,15 +282,15 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Delete + /// Account_Delete /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -259,15 +324,15 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Update + /// Account_Update /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -301,15 +366,15 @@ public virtual async Task> UpdateAsyn /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Update + /// Account_Update /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -343,15 +408,15 @@ public virtual Response Update(PlaywrightTesti /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Get + /// Account_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -405,15 +470,15 @@ public virtual async Task> AddTagAsyn /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Get + /// Account_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -467,15 +532,15 @@ public virtual Response AddTag(string key, str /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Get + /// Account_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -524,15 +589,15 @@ public virtual async Task> SetTagsAsy /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Get + /// Account_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -581,15 +646,15 @@ public virtual Response SetTags(IDictionary /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Get + /// Account_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -641,15 +706,15 @@ public virtual async Task> RemoveTagA /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName} /// /// /// Operation Id - /// Accounts_Get + /// Account_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaCollection.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaCollection.cs index 46c3f62e9537a..85292fdfd9f46 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaCollection.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaCollection.cs @@ -28,7 +28,7 @@ public partial class PlaywrightTestingQuotaCollection : ArmCollection, IEnumerab { private readonly ClientDiagnostics _playwrightTestingQuotaQuotasClientDiagnostics; private readonly QuotasRestOperations _playwrightTestingQuotaQuotasRestClient; - private readonly AzureLocation _location; + private readonly string _location; /// Initializes a new instance of the class for mocking. protected PlaywrightTestingQuotaCollection() @@ -39,7 +39,9 @@ protected PlaywrightTestingQuotaCollection() /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. /// The location of quota in ARM Normalized format like eastus, southeastasia etc. - internal PlaywrightTestingQuotaCollection(ArmClient client, ResourceIdentifier id, AzureLocation location) : base(client, id) + /// is null. + /// is an empty string, and was expected to be non-empty. + internal PlaywrightTestingQuotaCollection(ArmClient client, ResourceIdentifier id, string location) : base(client, id) { _location = location; _playwrightTestingQuotaQuotasClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PlaywrightTesting", PlaywrightTestingQuotaResource.ResourceType.Namespace, Diagnostics); @@ -57,19 +59,19 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get quota by name. + /// Get subscription quota by name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{name} + /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} /// /// /// Operation Id - /// Quotas_Get + /// Quota_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -77,15 +79,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// The quota name. + /// The quota name. /// The cancellation token to use. - public virtual async Task> GetAsync(PlaywrightTestingQuotaName name, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) { using var scope = _playwrightTestingQuotaQuotasClientDiagnostics.CreateScope("PlaywrightTestingQuotaCollection.Get"); scope.Start(); try { - var response = await _playwrightTestingQuotaQuotasRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), name, cancellationToken).ConfigureAwait(false); + var response = await _playwrightTestingQuotaQuotasRestClient.GetAsync(Id.SubscriptionId, _location, quotaName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new PlaywrightTestingQuotaResource(Client, response.Value), response.GetRawResponse()); @@ -98,19 +100,19 @@ public virtual async Task> GetAsync(Pla } /// - /// Get quota by name. + /// Get subscription quota by name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{name} + /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} /// /// /// Operation Id - /// Quotas_Get + /// Quota_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -118,15 +120,15 @@ public virtual async Task> GetAsync(Pla /// /// /// - /// The quota name. + /// The quota name. /// The cancellation token to use. - public virtual Response Get(PlaywrightTestingQuotaName name, CancellationToken cancellationToken = default) + public virtual Response Get(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) { using var scope = _playwrightTestingQuotaQuotasClientDiagnostics.CreateScope("PlaywrightTestingQuotaCollection.Get"); scope.Start(); try { - var response = _playwrightTestingQuotaQuotasRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), name, cancellationToken); + var response = _playwrightTestingQuotaQuotasRestClient.Get(Id.SubscriptionId, _location, quotaName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new PlaywrightTestingQuotaResource(Client, response.Value), response.GetRawResponse()); @@ -147,11 +149,11 @@ public virtual Response Get(PlaywrightTestingQuo /// /// /// Operation Id - /// Quotas_ListBySubscription + /// Quota_ListBySubscription /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -163,8 +165,8 @@ public virtual Response Get(PlaywrightTestingQuo /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _playwrightTestingQuotaQuotasRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, new AzureLocation(_location)); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _playwrightTestingQuotaQuotasRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location)); + HttpMessage FirstPageRequest(int? pageSizeHint) => _playwrightTestingQuotaQuotasRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, _location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _playwrightTestingQuotaQuotasRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, _location); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PlaywrightTestingQuotaResource(Client, PlaywrightTestingQuotaData.DeserializePlaywrightTestingQuotaData(e)), _playwrightTestingQuotaQuotasClientDiagnostics, Pipeline, "PlaywrightTestingQuotaCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -177,11 +179,11 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Operation Id - /// Quotas_ListBySubscription + /// Quota_ListBySubscription /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -193,8 +195,8 @@ public virtual AsyncPageable GetAllAsync(Cancell /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _playwrightTestingQuotaQuotasRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, new AzureLocation(_location)); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _playwrightTestingQuotaQuotasRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location)); + HttpMessage FirstPageRequest(int? pageSizeHint) => _playwrightTestingQuotaQuotasRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, _location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _playwrightTestingQuotaQuotasRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, _location); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PlaywrightTestingQuotaResource(Client, PlaywrightTestingQuotaData.DeserializePlaywrightTestingQuotaData(e)), _playwrightTestingQuotaQuotasClientDiagnostics, Pipeline, "PlaywrightTestingQuotaCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -203,15 +205,15 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{name} + /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} /// /// /// Operation Id - /// Quotas_Get + /// Quota_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -219,15 +221,15 @@ public virtual Pageable GetAll(CancellationToken /// /// /// - /// The quota name. + /// The quota name. /// The cancellation token to use. - public virtual async Task> ExistsAsync(PlaywrightTestingQuotaName name, CancellationToken cancellationToken = default) + public virtual async Task> ExistsAsync(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) { using var scope = _playwrightTestingQuotaQuotasClientDiagnostics.CreateScope("PlaywrightTestingQuotaCollection.Exists"); scope.Start(); try { - var response = await _playwrightTestingQuotaQuotasRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), name, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _playwrightTestingQuotaQuotasRestClient.GetAsync(Id.SubscriptionId, _location, quotaName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -242,15 +244,15 @@ public virtual async Task> ExistsAsync(PlaywrightTestingQuotaName /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{name} + /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} /// /// /// Operation Id - /// Quotas_Get + /// Quota_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -258,15 +260,15 @@ public virtual async Task> ExistsAsync(PlaywrightTestingQuotaName /// /// /// - /// The quota name. + /// The quota name. /// The cancellation token to use. - public virtual Response Exists(PlaywrightTestingQuotaName name, CancellationToken cancellationToken = default) + public virtual Response Exists(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) { using var scope = _playwrightTestingQuotaQuotasClientDiagnostics.CreateScope("PlaywrightTestingQuotaCollection.Exists"); scope.Start(); try { - var response = _playwrightTestingQuotaQuotasRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), name, cancellationToken: cancellationToken); + var response = _playwrightTestingQuotaQuotasRestClient.Get(Id.SubscriptionId, _location, quotaName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -281,15 +283,15 @@ public virtual Response Exists(PlaywrightTestingQuotaName name, Cancellati /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{name} + /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} /// /// /// Operation Id - /// Quotas_Get + /// Quota_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -297,15 +299,15 @@ public virtual Response Exists(PlaywrightTestingQuotaName name, Cancellati /// /// /// - /// The quota name. + /// The quota name. /// The cancellation token to use. - public virtual async Task> GetIfExistsAsync(PlaywrightTestingQuotaName name, CancellationToken cancellationToken = default) + public virtual async Task> GetIfExistsAsync(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) { using var scope = _playwrightTestingQuotaQuotasClientDiagnostics.CreateScope("PlaywrightTestingQuotaCollection.GetIfExists"); scope.Start(); try { - var response = await _playwrightTestingQuotaQuotasRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), name, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _playwrightTestingQuotaQuotasRestClient.GetAsync(Id.SubscriptionId, _location, quotaName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new PlaywrightTestingQuotaResource(Client, response.Value), response.GetRawResponse()); @@ -322,15 +324,15 @@ public virtual async Task> GetI /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{name} + /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} /// /// /// Operation Id - /// Quotas_Get + /// Quota_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -338,15 +340,15 @@ public virtual async Task> GetI /// /// /// - /// The quota name. + /// The quota name. /// The cancellation token to use. - public virtual NullableResponse GetIfExists(PlaywrightTestingQuotaName name, CancellationToken cancellationToken = default) + public virtual NullableResponse GetIfExists(PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) { using var scope = _playwrightTestingQuotaQuotasClientDiagnostics.CreateScope("PlaywrightTestingQuotaCollection.GetIfExists"); scope.Start(); try { - var response = _playwrightTestingQuotaQuotasRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), name, cancellationToken: cancellationToken); + var response = _playwrightTestingQuotaQuotasRestClient.Get(Id.SubscriptionId, _location, quotaName, cancellationToken: cancellationToken); if (response.Value == null) return new NoValueResponse(response.GetRawResponse()); return Response.FromValue(new PlaywrightTestingQuotaResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaData.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaData.Serialization.cs index 88de95a31d928..fcb4a96dfe0fa 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaData.Serialization.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaData.Serialization.cs @@ -37,19 +37,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(FreeTrial)) - { - writer.WritePropertyName("freeTrial"u8); - writer.WriteObjectValue(FreeTrial, options); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + if (Optional.IsDefined(Properties)) { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); } - writer.WriteEndObject(); } PlaywrightTestingQuotaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -72,16 +64,24 @@ internal static PlaywrightTestingQuotaData DeserializePlaywrightTestingQuotaData { return null; } + PlaywrightTestingQuotaProperties properties = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; - FreeTrialProperties freeTrial = default; - PlaywrightTestingProvisioningState? provisioningState = 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 = PlaywrightTestingQuotaProperties.DeserializePlaywrightTestingQuotaProperties(property.Value, options); + continue; + } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -106,36 +106,6 @@ internal static PlaywrightTestingQuotaData DeserializePlaywrightTestingQuotaData systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("freeTrial"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - freeTrial = FreeTrialProperties.DeserializeFreeTrialProperties(property0.Value, options); - continue; - } - if (property0.NameEquals("provisioningState"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new PlaywrightTestingProvisioningState(property0.Value.GetString()); - continue; - } - } - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -147,8 +117,7 @@ internal static PlaywrightTestingQuotaData DeserializePlaywrightTestingQuotaData name, type, systemData, - freeTrial, - provisioningState, + properties, serializedAdditionalRawData); } diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaData.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaData.cs index 3fa5e8103e209..055e48773351c 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaData.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaData.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.PlaywrightTesting { /// /// A class representing the PlaywrightTestingQuota data model. - /// A quota resource + /// A subscription quota resource. /// public partial class PlaywrightTestingQuotaData : ResourceData { @@ -52,7 +52,7 @@ public partial class PlaywrightTestingQuotaData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - public PlaywrightTestingQuotaData() + internal PlaywrightTestingQuotaData() { } @@ -61,19 +61,15 @@ public PlaywrightTestingQuotaData() /// The name. /// The resourceType. /// The systemData. - /// The free-trial quota. - /// The status of the last operation. + /// The resource-specific properties for this resource. /// Keeps track of any properties unknown to the library. - internal PlaywrightTestingQuotaData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, FreeTrialProperties freeTrial, PlaywrightTestingProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal PlaywrightTestingQuotaData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, PlaywrightTestingQuotaProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { - FreeTrial = freeTrial; - ProvisioningState = provisioningState; + Properties = properties; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The free-trial quota. - public FreeTrialProperties FreeTrial { get; set; } - /// The status of the last operation. - public PlaywrightTestingProvisioningState? ProvisioningState { get; } + /// The resource-specific properties for this resource. + public PlaywrightTestingQuotaProperties Properties { get; } } } diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaResource.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaResource.cs index 9e0df63a1688e..520475a00b758 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaResource.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaResource.cs @@ -27,10 +27,10 @@ public partial class PlaywrightTestingQuotaResource : ArmResource /// Generate the resource identifier of a instance. /// The subscriptionId. /// The location. - /// The name. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, AzureLocation location, PlaywrightTestingQuotaName name) + /// The quotaName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, AzureLocation location, PlaywrightTestingQuotaName quotaName) { - var resourceId = $"/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{name}"; + var resourceId = $"/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName}"; return new ResourceIdentifier(resourceId); } @@ -90,19 +90,19 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Get quota by name. + /// Get subscription quota by name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{name} + /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} /// /// /// Operation Id - /// Quotas_Get + /// Quota_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> GetAsync(Can scope.Start(); try { - var response = await _playwrightTestingQuotaQuotasRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _playwrightTestingQuotaQuotasRestClient.GetAsync(Id.SubscriptionId, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new PlaywrightTestingQuotaResource(Client, response.Value), response.GetRawResponse()); @@ -130,19 +130,19 @@ public virtual async Task> GetAsync(Can } /// - /// Get quota by name. + /// Get subscription quota by name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{name} + /// /subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName} /// /// /// Operation Id - /// Quotas_Get + /// Quota_Get /// /// /// Default Api Version - /// 2023-10-01-preview + /// 2024-12-01 /// /// /// Resource @@ -157,7 +157,7 @@ public virtual Response Get(CancellationToken ca scope.Start(); try { - var response = _playwrightTestingQuotaQuotasRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken); + var response = _playwrightTestingQuotaQuotasRestClient.Get(Id.SubscriptionId, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new PlaywrightTestingQuotaResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/RestOperations/AccountQuotasRestOperations.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/RestOperations/AccountQuotasRestOperations.cs new file mode 100644 index 0000000000000..a81831f6b1ba6 --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/RestOperations/AccountQuotasRestOperations.cs @@ -0,0 +1,319 @@ +// 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.PlaywrightTesting.Models; + +namespace Azure.ResourceManager.PlaywrightTesting +{ + internal partial class AccountQuotasRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AccountQuotasRestOperations. + /// 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 AccountQuotasRestOperations(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-12-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string accountName, PlaywrightTestingQuotaName quotaName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/accounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/quotas/", false); + uri.AppendPath(quotaName.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string accountName, PlaywrightTestingQuotaName quotaName) + { + 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.AzurePlaywrightService/accounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/quotas/", false); + uri.AppendPath(quotaName.ToString(), true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get quota by name for an account. + /// 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 account. + /// The Playwright service account quota 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 accountName, PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, quotaName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PlaywrightTestingAccountQuotaData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = PlaywrightTestingAccountQuotaData.DeserializePlaywrightTestingAccountQuotaData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PlaywrightTestingAccountQuotaData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get quota by name for an account. + /// 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 account. + /// The Playwright service account quota 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 accountName, PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName, quotaName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PlaywrightTestingAccountQuotaData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = PlaywrightTestingAccountQuotaData.DeserializePlaywrightTestingAccountQuotaData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PlaywrightTestingAccountQuotaData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByAccountRequestUri(string subscriptionId, string resourceGroupName, string accountName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/accounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/quotas", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByAccountRequest(string subscriptionId, string resourceGroupName, string accountName) + { + 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.AzurePlaywrightService/accounts/", false); + uri.AppendPath(accountName, true); + uri.AppendPath("/quotas", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List quotas for a given account. + /// 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 account. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByAccountAsync(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateListByAccountRequest(subscriptionId, resourceGroupName, accountName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AccountQuotaListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AccountQuotaListResult.DeserializeAccountQuotaListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List quotas for a given account. + /// 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 account. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByAccount(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateListByAccountRequest(subscriptionId, resourceGroupName, accountName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AccountQuotaListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AccountQuotaListResult.DeserializeAccountQuotaListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByAccountNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string accountName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByAccountNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string accountName) + { + 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 quotas for a given account. + /// 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. + /// Name of account. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByAccountNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateListByAccountNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AccountQuotaListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AccountQuotaListResult.DeserializeAccountQuotaListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List quotas for a given account. + /// 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. + /// Name of account. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByAccountNextPage(string nextLink, string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + + using var message = CreateListByAccountNextPageRequest(nextLink, subscriptionId, resourceGroupName, accountName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AccountQuotaListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AccountQuotaListResult.DeserializeAccountQuotaListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/RestOperations/AccountsRestOperations.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/RestOperations/AccountsRestOperations.cs index 3a09ccf89ae7a..c5c311d28ceb6 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/RestOperations/AccountsRestOperations.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/RestOperations/AccountsRestOperations.cs @@ -25,29 +25,32 @@ internal partial class AccountsRestOperations /// Initializes a new instance of AccountsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public AccountsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-10-01-preview"; + _apiVersion = apiVersion ?? "2024-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string accountName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/accounts", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/accounts/", false); + uri.AppendPath(accountName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string accountName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -56,7 +59,10 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/accounts", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/accounts/", false); + uri.AppendPath(accountName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -64,57 +70,69 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) return message; } - /// List Account resources by subscription ID. - /// The ID of the target subscription. + /// Get a Account. + /// 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 account. /// 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) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - using var message = CreateListBySubscriptionRequest(subscriptionId); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - AccountListResult value = default; + PlaywrightTestingAccountData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AccountListResult.DeserializeAccountListResult(document.RootElement); + value = PlaywrightTestingAccountData.DeserializePlaywrightTestingAccountData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((PlaywrightTestingAccountData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// List Account resources by subscription ID. - /// The ID of the target subscription. + /// Get a Account. + /// 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 account. /// 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) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - using var message = CreateListBySubscriptionRequest(subscriptionId); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, accountName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - AccountListResult value = default; + PlaywrightTestingAccountData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AccountListResult.DeserializeAccountListResult(document.RootElement); + value = PlaywrightTestingAccountData.DeserializePlaywrightTestingAccountData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((PlaywrightTestingAccountData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, PlaywrightTestingAccountData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -122,85 +140,91 @@ internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscripti uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/accounts", false); + uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/accounts/", false); + uri.AppendPath(accountName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, PlaywrightTestingAccountData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + 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.AzurePlaywrightService/accounts", false); + uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/accounts/", false); + uri.AppendPath(accountName, 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; } - /// List Account resources by resource group. - /// The ID of the target subscription. + /// Create a Account. + /// 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 account. + /// 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> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string accountName, PlaywrightTestingAccountData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - AccountListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AccountListResult.DeserializeAccountListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// List Account resources by resource group. - /// The ID of the target subscription. + /// Create a Account. + /// 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 account. + /// 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 ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, PlaywrightTestingAccountData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - AccountListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AccountListResult.DeserializeAccountListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string accountName, PlaywrightTestingAccountPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -209,16 +233,16 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/accounts/", false); - uri.AppendPath(name, true); + uri.AppendPath(accountName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, PlaywrightTestingAccountPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -226,28 +250,34 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/accounts/", false); - uri.AppendPath(name, true); + uri.AppendPath(accountName, 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; } - /// Get a Account. - /// The ID of the target subscription. + /// Update a Account. + /// 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 account. + /// Name of account. + /// 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> GetAsync(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string accountName, PlaywrightTestingAccountPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, name); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -258,27 +288,27 @@ public async Task> GetAsync(string subscr value = PlaywrightTestingAccountData.DeserializePlaywrightTestingAccountData(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((PlaywrightTestingAccountData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Get a Account. - /// The ID of the target subscription. + /// Update a Account. + /// 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 account. + /// Name of account. + /// 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 Get(string subscriptionId, string resourceGroupName, string name, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string accountName, PlaywrightTestingAccountPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, name); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, accountName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -289,14 +319,12 @@ public Response Get(string subscriptionId, string value = PlaywrightTestingAccountData.DeserializePlaywrightTestingAccountData(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((PlaywrightTestingAccountData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string name, PlaywrightTestingAccountData data) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string accountName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -305,16 +333,16 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/accounts/", false); - uri.AppendPath(name, true); + uri.AppendPath(accountName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string name, PlaywrightTestingAccountData data) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string accountName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -322,73 +350,65 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/accounts/", false); - uri.AppendPath(name, true); + uri.AppendPath(accountName, 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 Account. - /// The ID of the target subscription. + /// Delete a Account. + /// 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 account. - /// Resource create parameters. + /// Name of account. /// 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 name, PlaywrightTestingAccountData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, name, data); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Create a Account. - /// The ID of the target subscription. + /// Delete a Account. + /// 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 account. - /// Resource create parameters. + /// Name of account. /// 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 name, PlaywrightTestingAccountData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string accountName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, name, data); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, accountName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string name, PlaywrightTestingAccountPatch patch) + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -396,60 +416,50 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/accounts/", false); - uri.AppendPath(name, true); + uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/accounts", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string name, PlaywrightTestingAccountPatch patch) + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + 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.AzurePlaywrightService/accounts/", false); - uri.AppendPath(name, true); + uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/accounts", 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(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Update a Account. - /// The ID of the target subscription. + /// List Account 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. - /// Name of account. - /// 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 name, PlaywrightTestingAccountPatch patch, CancellationToken cancellationToken = default) + /// 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)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, name, patch); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - PlaywrightTestingAccountData value = default; + AccountListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = PlaywrightTestingAccountData.DeserializePlaywrightTestingAccountData(document.RootElement); + value = AccountListResult.DeserializeAccountListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -457,30 +467,26 @@ public async Task> UpdateAsync(string sub } } - /// Update a Account. - /// The ID of the target subscription. + /// List Account 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. - /// Name of account. - /// 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 name, PlaywrightTestingAccountPatch patch, CancellationToken cancellationToken = default) + /// 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)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, name, patch); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - PlaywrightTestingAccountData value = default; + AccountListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = PlaywrightTestingAccountData.DeserializePlaywrightTestingAccountData(document.RootElement); + value = AccountListResult.DeserializeAccountListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -488,33 +494,27 @@ public Response Update(string subscriptionId, stri } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string name) + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/accounts/", false); - uri.AppendPath(name, true); + uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/accounts", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string name) + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + 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.AzurePlaywrightService/accounts/", false); - uri.AppendPath(name, true); + uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/accounts", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -522,100 +522,108 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Delete a Account. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of account. + /// List Account resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. /// 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 name, CancellationToken cancellationToken = default) + /// 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)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, name); + using var message = CreateListBySubscriptionRequest(subscriptionId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + AccountListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AccountListResult.DeserializeAccountListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Delete a Account. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of account. + /// List Account resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. /// 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 name, CancellationToken cancellationToken = default) + /// 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)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, name); + using var message = CreateListBySubscriptionRequest(subscriptionId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + AccountListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AccountListResult.DeserializeAccountListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + internal RequestUriBuilder CreateCheckPlaywrightTestingNameAvailabilityRequestUri(string subscriptionId, PlaywrightTestingNameAvailabilityContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/checkNameAvailability", false); + uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + internal HttpMessage CreateCheckPlaywrightTestingNameAvailabilityRequest(string subscriptionId, PlaywrightTestingNameAvailabilityContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/checkNameAvailability", false); + uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// List Account resources by subscription ID. - /// The URL to the next page of results. - /// The ID of the target subscription. + /// Adds check global name availability operation, normally used if a resource name must be globally unique. + /// The ID of the target subscription. The value must be an UUID. + /// The CheckAvailability request. /// The cancellation token to use. - /// or is null. + /// 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) + public async Task> CheckPlaywrightTestingNameAvailabilityAsync(string subscriptionId, PlaywrightTestingNameAvailabilityContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + using var message = CreateCheckPlaywrightTestingNameAvailabilityRequest(subscriptionId, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - AccountListResult value = default; + PlaywrightTestingNameAvailabilityResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AccountListResult.DeserializeAccountListResult(document.RootElement); + value = PlaywrightTestingNameAvailabilityResult.DeserializePlaywrightTestingNameAvailabilityResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -623,26 +631,26 @@ public async Task> ListBySubscriptionNextPageAsync(s } } - /// List Account resources by subscription ID. - /// The URL to the next page of results. - /// The ID of the target subscription. + /// Adds check global name availability operation, normally used if a resource name must be globally unique. + /// The ID of the target subscription. The value must be an UUID. + /// The CheckAvailability request. /// The cancellation token to use. - /// or is null. + /// or is null. /// is an empty string, and was expected to be non-empty. - public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + public Response CheckPlaywrightTestingNameAvailability(string subscriptionId, PlaywrightTestingNameAvailabilityContent content, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + using var message = CreateCheckPlaywrightTestingNameAvailabilityRequest(subscriptionId, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - AccountListResult value = default; + PlaywrightTestingNameAvailabilityResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AccountListResult.DeserializeAccountListResult(document.RootElement); + value = PlaywrightTestingNameAvailabilityResult.DeserializePlaywrightTestingNameAvailabilityResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -674,7 +682,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// List Account resources by resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// 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. @@ -703,7 +711,7 @@ public async Task> ListByResourceGroupNextPageAsync( /// List Account resources by resource group. /// The URL to the next page of results. - /// The ID of the target subscription. + /// 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. @@ -729,5 +737,81 @@ public Response ListByResourceGroupNextPage(string nextLink, 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 Account 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: + { + AccountListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = AccountListResult.DeserializeAccountListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Account 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: + { + AccountListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = AccountListResult.DeserializeAccountListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/RestOperations/QuotasRestOperations.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/RestOperations/QuotasRestOperations.cs index 847b5ddbfa83c..5a2d9a8afbd41 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/RestOperations/QuotasRestOperations.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/RestOperations/QuotasRestOperations.cs @@ -25,18 +25,18 @@ internal partial class QuotasRestOperations /// Initializes a new instance of QuotasRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public QuotasRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-10-01-preview"; + _apiVersion = apiVersion ?? "2024-12-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId, AzureLocation location) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string location, PlaywrightTestingQuotaName quotaName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -44,12 +44,13 @@ internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptio uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/quotas", false); + uri.AppendPath("/quotas/", false); + uri.AppendPath(quotaName.ToString(), true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, AzureLocation location) + internal HttpMessage CreateGetRequest(string subscriptionId, string location, PlaywrightTestingQuotaName quotaName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -60,7 +61,8 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, Azur uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/quotas", false); + uri.AppendPath("/quotas/", false); + uri.AppendPath(quotaName.ToString(), true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -68,59 +70,67 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, Azur return message; } - /// List quotas for a given subscription Id. - /// The ID of the target subscription. + /// Get subscription quota by name. + /// The ID of the target subscription. The value must be an UUID. /// The location of quota in ARM Normalized format like eastus, southeastasia etc. + /// The quota name. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string location, PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); - using var message = CreateListBySubscriptionRequest(subscriptionId, location); + using var message = CreateGetRequest(subscriptionId, location, quotaName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - QuotaListResult value = default; + PlaywrightTestingQuotaData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = QuotaListResult.DeserializeQuotaListResult(document.RootElement); + value = PlaywrightTestingQuotaData.DeserializePlaywrightTestingQuotaData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((PlaywrightTestingQuotaData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// List quotas for a given subscription Id. - /// The ID of the target subscription. + /// Get subscription quota by name. + /// The ID of the target subscription. The value must be an UUID. /// The location of quota in ARM Normalized format like eastus, southeastasia etc. + /// The quota name. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySubscription(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string location, PlaywrightTestingQuotaName quotaName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); - using var message = CreateListBySubscriptionRequest(subscriptionId, location); + using var message = CreateGetRequest(subscriptionId, location, quotaName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - QuotaListResult value = default; + PlaywrightTestingQuotaData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = QuotaListResult.DeserializeQuotaListResult(document.RootElement); + value = PlaywrightTestingQuotaData.DeserializePlaywrightTestingQuotaData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((PlaywrightTestingQuotaData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, PlaywrightTestingQuotaName name) + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId, string location) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -128,13 +138,12 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocat uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/quotas/", false); - uri.AppendPath(name.ToString(), true); + uri.AppendPath("/quotas", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, PlaywrightTestingQuotaName name) + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, string location) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -145,8 +154,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation locat uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.AzurePlaywrightService/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/quotas/", false); - uri.AppendPath(name.ToString(), true); + uri.AppendPath("/quotas", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -154,65 +162,61 @@ internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation locat return message; } - /// Get quota by name. - /// The ID of the target subscription. + /// List quotas for a given subscription Id. + /// The ID of the target subscription. The value must be an UUID. /// The location of quota in ARM Normalized format like eastus, southeastasia etc. - /// The quota name. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, AzureLocation location, PlaywrightTestingQuotaName name, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, string location, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); - using var message = CreateGetRequest(subscriptionId, location, name); + using var message = CreateListBySubscriptionRequest(subscriptionId, location); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - PlaywrightTestingQuotaData value = default; + QuotaListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = PlaywrightTestingQuotaData.DeserializePlaywrightTestingQuotaData(document.RootElement); + value = QuotaListResult.DeserializeQuotaListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((PlaywrightTestingQuotaData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Get quota by name. - /// The ID of the target subscription. + /// List quotas for a given subscription Id. + /// The ID of the target subscription. The value must be an UUID. /// The location of quota in ARM Normalized format like eastus, southeastasia etc. - /// The quota name. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, AzureLocation location, PlaywrightTestingQuotaName name, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, string location, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); - using var message = CreateGetRequest(subscriptionId, location, name); + using var message = CreateListBySubscriptionRequest(subscriptionId, location); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - PlaywrightTestingQuotaData value = default; + QuotaListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = PlaywrightTestingQuotaData.DeserializePlaywrightTestingQuotaData(document.RootElement); + value = QuotaListResult.DeserializeQuotaListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((PlaywrightTestingQuotaData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location) + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId, string location) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -220,7 +224,7 @@ internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nex return uri; } - internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId, AzureLocation location) + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId, string location) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -236,15 +240,16 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// List quotas for a given subscription Id. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The location of quota in ARM Normalized format like eastus, southeastasia etc. /// 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, AzureLocation location, CancellationToken cancellationToken = default) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(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 = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, location); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); @@ -264,15 +269,16 @@ public async Task> ListBySubscriptionNextPageAsync(str /// List quotas for a given subscription Id. /// The URL to the next page of results. - /// The ID of the target subscription. + /// The ID of the target subscription. The value must be an UUID. /// The location of quota in ARM Normalized format like eastus, southeastasia etc. /// 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, AzureLocation location, CancellationToken cancellationToken = default) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(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 = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, location); _pipeline.Send(message, cancellationToken); diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/autorest.md b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/autorest.md deleted file mode 100644 index 88a3b30b223e7..0000000000000 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/autorest.md +++ /dev/null @@ -1,63 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateCode` to generate code. - -``` yaml -azure-arm: true -csharp: true -library-name: PlaywrightTesting -namespace: Azure.ResourceManager.PlaywrightTesting -require: https://github.com/Azure/azure-rest-api-specs/blob/1285ef63d84c4bf3dfe42b514451822e1dd6e8fc/specification/playwrighttesting/resource-manager/readme.md -#tag: package-2023-10-01-preview -output-folder: $(this-folder)/Generated -clear-output-folder: true -sample-gen: - output-folder: $(this-folder)/../samples/Generated - clear-output-folder: true -skip-csproj: true -modelerfour: - flatten-payloads: false -use-model-reader-writer: true - -#mgmt-debug: -# show-serialized-names: true - -rename-mapping: - Quota: PlaywrightTestingQuotas - -prepend-rp-prefix: - - QuotaNames - - Account - - ProvisioningState - -format-by-name-rules: - 'tenantId': 'uuid' - 'ETag': 'etag' - 'location': 'azure-location' - '*Uri': 'Uri' - '*Uris': 'Uri' - -acronym-mapping: - CPU: Cpu - CPUs: Cpus - Os: OS - Ip: IP - Ips: IPs|ips - ID: Id - IDs: Ids - VM: Vm - VMs: Vms - Vmos: VmOS - VMScaleSet: VmScaleSet - DNS: Dns - VPN: Vpn - NAT: Nat - WAN: Wan - Ipv4: IPv4|ipv4 - Ipv6: IPv6|ipv6 - Ipsec: IPsec|ipsec - SSO: Sso - URI: Uri - Etag: ETag|etag - -``` diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tsp-location.yaml b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tsp-location.yaml new file mode 100644 index 0000000000000..60f1945eab730 --- /dev/null +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/playwrighttesting/PlaywrightTesting.Management +commit: f0b119999d4ba0d7a2f92eebc0f419f5ee66ff81 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/playwrighttesting/ci.mgmt.yml b/sdk/playwrighttesting/ci.mgmt.yml index 79addf69162cf..b6422b373563e 100644 --- a/sdk/playwrighttesting/ci.mgmt.yml +++ b/sdk/playwrighttesting/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/playwrighttesting/ci.mgmt.yml - sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/playwrighttesting/ci.mgmt.yml + - sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/policyinsights/ci.mgmt.yml b/sdk/policyinsights/ci.mgmt.yml index 56fa5c3ead85a..c0fa9e7dd9173 100644 --- a/sdk/policyinsights/ci.mgmt.yml +++ b/sdk/policyinsights/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/policyinsights/ci.mgmt.yml - sdk/policyinsights/Azure.ResourceManager.PolicyInsights/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/policyinsights/ci.mgmt.yml + - sdk/policyinsights/Azure.ResourceManager.PolicyInsights/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/postgresql/ci.mgmt.yml b/sdk/postgresql/ci.mgmt.yml index 77dbaed301ba3..08dff06cd11f9 100644 --- a/sdk/postgresql/ci.mgmt.yml +++ b/sdk/postgresql/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/postgresql/ci.mgmt.yml - sdk/postgresql/Azure.ResourceManager.PostgreSql/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/postgresql/ci.mgmt.yml + - sdk/postgresql/Azure.ResourceManager.PostgreSql/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/powerbidedicated/ci.mgmt.yml b/sdk/powerbidedicated/ci.mgmt.yml index 414f2b8ef0a91..951d3e8d04348 100644 --- a/sdk/powerbidedicated/ci.mgmt.yml +++ b/sdk/powerbidedicated/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/powerbidedicated/ci.mgmt.yml - sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/powerbidedicated/ci.mgmt.yml + - sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/privatedns/ci.mgmt.yml b/sdk/privatedns/ci.mgmt.yml index 86401f2f96755..31c567bfe4089 100644 --- a/sdk/privatedns/ci.mgmt.yml +++ b/sdk/privatedns/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/privatedns/ci.mgmt.yml - sdk/privatedns/Azure.ResourceManager.PrivateDns/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/privatedns/ci.mgmt.yml + - sdk/privatedns/Azure.ResourceManager.PrivateDns/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/providerhub/ci.mgmt.yml b/sdk/providerhub/ci.mgmt.yml index 2c7f6ca61d3f0..3de6a7f30b80e 100644 --- a/sdk/providerhub/ci.mgmt.yml +++ b/sdk/providerhub/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/providerhub/ci.mgmt.yml - sdk/providerhub/Azure.ResourceManager.ProviderHub/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/providerhub/ci.mgmt.yml + - sdk/providerhub/Azure.ResourceManager.ProviderHub/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/purview/ci.mgmt.yml b/sdk/purview/ci.mgmt.yml index 226718ca583ce..d5961aa8833aa 100644 --- a/sdk/purview/ci.mgmt.yml +++ b/sdk/purview/ci.mgmt.yml @@ -1,5 +1,6 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -12,6 +13,18 @@ pr: - sdk/purview/ci.mgmt.yml - sdk/purview/Azure.ResourceManager.Purview/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/purview/ci.mgmt.yml + - sdk/purview/Azure.ResourceManager.Purview/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/quantum/ci.mgmt.yml b/sdk/quantum/ci.mgmt.yml index 8562320fa7c7e..6ee02d7799bdb 100644 --- a/sdk/quantum/ci.mgmt.yml +++ b/sdk/quantum/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/quantum/ci.mgmt.yml - sdk/quantum/Azure.ResourceManager.Quantum/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/quantum/ci.mgmt.yml + - sdk/quantum/Azure.ResourceManager.Quantum/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/qumulo/ci.mgmt.yml b/sdk/qumulo/ci.mgmt.yml index e89c4bea0e703..fe6e1fa253d36 100644 --- a/sdk/qumulo/ci.mgmt.yml +++ b/sdk/qumulo/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/qumulo/ci.mgmt.yml - sdk/qumulo/Azure.ResourceManager.Qumulo/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/qumulo/ci.mgmt.yml + - sdk/qumulo/Azure.ResourceManager.Qumulo/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/quota/ci.mgmt.yml b/sdk/quota/ci.mgmt.yml index f1f545ad13f15..9409730d342e5 100644 --- a/sdk/quota/ci.mgmt.yml +++ b/sdk/quota/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/quota/ci.mgmt.yml - sdk/quota/Azure.ResourceManager.Quota/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/quota/ci.mgmt.yml + - sdk/quota/Azure.ResourceManager.Quota/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/recoveryservices-backup/ci.mgmt.yml b/sdk/recoveryservices-backup/ci.mgmt.yml index 5edfd823e3c05..402121c0f72c6 100644 --- a/sdk/recoveryservices-backup/ci.mgmt.yml +++ b/sdk/recoveryservices-backup/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/recoveryservices-backup/ci.mgmt.yml - sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/recoveryservices-backup/ci.mgmt.yml + - sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/recoveryservices-datareplication/ci.mgmt.yml b/sdk/recoveryservices-datareplication/ci.mgmt.yml index 2e3966d67a889..143f2e0317c30 100644 --- a/sdk/recoveryservices-datareplication/ci.mgmt.yml +++ b/sdk/recoveryservices-datareplication/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/recoveryservices-datareplication/ci.mgmt.yml - sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/recoveryservices-datareplication/ci.mgmt.yml + - sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/recoveryservices-siterecovery/ci.mgmt.yml b/sdk/recoveryservices-siterecovery/ci.mgmt.yml index bded800f3ee2b..3a8a3179d5a53 100644 --- a/sdk/recoveryservices-siterecovery/ci.mgmt.yml +++ b/sdk/recoveryservices-siterecovery/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/recoveryservices-siterecovery/ci.mgmt.yml - sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/recoveryservices-siterecovery/ci.mgmt.yml + - sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/recoveryservices/ci.mgmt.yml b/sdk/recoveryservices/ci.mgmt.yml index 0e7e6985f21cf..d4a5e482dfa7d 100644 --- a/sdk/recoveryservices/ci.mgmt.yml +++ b/sdk/recoveryservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/recoveryservices/ci.mgmt.yml - sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/recoveryservices/ci.mgmt.yml + - sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/redis/ci.mgmt.yml b/sdk/redis/ci.mgmt.yml index 9e68453225804..dfc71e356b877 100644 --- a/sdk/redis/ci.mgmt.yml +++ b/sdk/redis/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/redis/ci.mgmt.yml - sdk/redis/Azure.ResourceManager.Redis/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/redis/ci.mgmt.yml + - sdk/redis/Azure.ResourceManager.Redis/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/redisenterprise/ci.mgmt.yml b/sdk/redisenterprise/ci.mgmt.yml index 93641cfe39839..294ec0377bdfb 100644 --- a/sdk/redisenterprise/ci.mgmt.yml +++ b/sdk/redisenterprise/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/redisenterprise/ci.mgmt.yml - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/redisenterprise/ci.mgmt.yml + - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/relay/ci.mgmt.yml b/sdk/relay/ci.mgmt.yml index b69a1efbd0f96..fc5a3764ebb54 100644 --- a/sdk/relay/ci.mgmt.yml +++ b/sdk/relay/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/relay/ci.mgmt.yml - sdk/relay/Azure.ResourceManager.Relay/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/relay/ci.mgmt.yml + - sdk/relay/Azure.ResourceManager.Relay/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/reservations/ci.mgmt.yml b/sdk/reservations/ci.mgmt.yml index c46c8c69cd2e3..8effbcdd44249 100644 --- a/sdk/reservations/ci.mgmt.yml +++ b/sdk/reservations/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/reservations/ci.mgmt.yml - sdk/reservations/Azure.ResourceManager.Reservations/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/reservations/ci.mgmt.yml + - sdk/reservations/Azure.ResourceManager.Reservations/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/resourceconnector/ci.mgmt.yml b/sdk/resourceconnector/ci.mgmt.yml index 81269b9113c70..149f1805dab45 100644 --- a/sdk/resourceconnector/ci.mgmt.yml +++ b/sdk/resourceconnector/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/resourceconnector/ci.mgmt.yml - sdk/resourceconnector/Azure.ResourceManager.ResourceConnector/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourceconnector/ci.mgmt.yml + - sdk/resourceconnector/Azure.ResourceManager.ResourceConnector/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/resourcegraph/ci.mgmt.yml b/sdk/resourcegraph/ci.mgmt.yml index 5abe050f7709b..27656bcd16c28 100644 --- a/sdk/resourcegraph/ci.mgmt.yml +++ b/sdk/resourcegraph/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/resourcegraph/ci.mgmt.yml - sdk/resourcegraph/Azure.ResourceManager.ResourceGraph/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcegraph/ci.mgmt.yml + - sdk/resourcegraph/Azure.ResourceManager.ResourceGraph/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/resourcehealth/ci.mgmt.yml b/sdk/resourcehealth/ci.mgmt.yml index fb0a27171a692..bf3868346c7b8 100644 --- a/sdk/resourcehealth/ci.mgmt.yml +++ b/sdk/resourcehealth/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/resourcehealth/ci.mgmt.yml - sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcehealth/ci.mgmt.yml + - sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/resourcemover/ci.mgmt.yml b/sdk/resourcemover/ci.mgmt.yml index 519b8a4319268..bbb814c6a4f00 100644 --- a/sdk/resourcemover/ci.mgmt.yml +++ b/sdk/resourcemover/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/resourcemover/ci.mgmt.yml - sdk/resourcemover/Azure.ResourceManager.ResourceMover/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemover/ci.mgmt.yml + - sdk/resourcemover/Azure.ResourceManager.ResourceMover/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/resources/ci.mgmt.yml b/sdk/resources/ci.mgmt.yml index 3fefd5254c859..ff65cb96d07df 100644 --- a/sdk/resources/ci.mgmt.yml +++ b/sdk/resources/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/resources/ci.mgmt.yml - sdk/resources/Azure.ResourceManager.Resources/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resources/ci.mgmt.yml + - sdk/resources/Azure.ResourceManager.Resources/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/search/ci.mgmt.yml b/sdk/search/ci.mgmt.yml index a8c2a632c1c85..63c0e200644f5 100644 --- a/sdk/search/ci.mgmt.yml +++ b/sdk/search/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/search/ci.mgmt.yml - sdk/search/Azure.ResourceManager.Search/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/search/ci.mgmt.yml + - sdk/search/Azure.ResourceManager.Search/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/securitycenter/ci.mgmt.yml b/sdk/securitycenter/ci.mgmt.yml index c728522efab24..6ed8ff4d67a92 100644 --- a/sdk/securitycenter/ci.mgmt.yml +++ b/sdk/securitycenter/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/securitycenter/ci.mgmt.yml - sdk/securitycenter/Azure.ResourceManager.SecurityCenter/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/securitycenter/ci.mgmt.yml + - sdk/securitycenter/Azure.ResourceManager.SecurityCenter/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/securitydevops/ci.mgmt.yml b/sdk/securitydevops/ci.mgmt.yml index c5a54a9ad2065..972d98a7376ec 100644 --- a/sdk/securitydevops/ci.mgmt.yml +++ b/sdk/securitydevops/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/securitydevops/ci.mgmt.yml - sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/securitydevops/ci.mgmt.yml + - sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/securityinsights/ci.mgmt.yml b/sdk/securityinsights/ci.mgmt.yml index f1d428ebef90f..0659cac2858ff 100644 --- a/sdk/securityinsights/ci.mgmt.yml +++ b/sdk/securityinsights/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/securityinsights/ci.mgmt.yml - sdk/securityinsights/Azure.ResourceManager.SecurityInsights/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/securityinsights/ci.mgmt.yml + - sdk/securityinsights/Azure.ResourceManager.SecurityInsights/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/selfhelp/ci.mgmt.yml b/sdk/selfhelp/ci.mgmt.yml index bb6a162210ebc..ac13ec845ce76 100644 --- a/sdk/selfhelp/ci.mgmt.yml +++ b/sdk/selfhelp/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/selfhelp/ci.mgmt.yml - sdk/selfhelp/Azure.ResourceManager.SelfHelp/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/selfhelp/ci.mgmt.yml + - sdk/selfhelp/Azure.ResourceManager.SelfHelp/ + extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/servicebus/ci.mgmt.yml b/sdk/servicebus/ci.mgmt.yml index 02c45dc88e18c..f2ead205ced64 100644 --- a/sdk/servicebus/ci.mgmt.yml +++ b/sdk/servicebus/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/servicebus/ci.mgmt.yml - sdk/servicebus/Azure.ResourceManager.ServiceBus/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/servicebus/ci.mgmt.yml + - sdk/servicebus/Azure.ResourceManager.ServiceBus/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/servicefabric/ci.mgmt.yml b/sdk/servicefabric/ci.mgmt.yml index 430f48c8c87bd..afc886a4f7f29 100644 --- a/sdk/servicefabric/ci.mgmt.yml +++ b/sdk/servicefabric/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/servicefabric/ci.mgmt.yml - sdk/servicefabric/Azure.ResourceManager.ServiceFabric/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/servicefabric/ci.mgmt.yml + - sdk/servicefabric/Azure.ResourceManager.ServiceFabric/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/servicefabricmanagedclusters/ci.mgmt.yml b/sdk/servicefabricmanagedclusters/ci.mgmt.yml index e73289f589f4c..022ac0f03cd10 100644 --- a/sdk/servicefabricmanagedclusters/ci.mgmt.yml +++ b/sdk/servicefabricmanagedclusters/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/servicefabricmanagedclusters/ci.mgmt.yml - sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/servicefabricmanagedclusters/ci.mgmt.yml + - sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/servicelinker/ci.mgmt.yml b/sdk/servicelinker/ci.mgmt.yml index 77df314e977ad..6069e04a31573 100644 --- a/sdk/servicelinker/ci.mgmt.yml +++ b/sdk/servicelinker/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/servicelinker/ci.mgmt.yml - sdk/servicelinker/Azure.ResourceManager.ServiceLinker/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/servicelinker/ci.mgmt.yml + - sdk/servicelinker/Azure.ResourceManager.ServiceLinker/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/servicenetworking/ci.mgmt.yml b/sdk/servicenetworking/ci.mgmt.yml index b2332ae152242..4551f13254758 100644 --- a/sdk/servicenetworking/ci.mgmt.yml +++ b/sdk/servicenetworking/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/servicenetworking/ci.mgmt.yml - sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/servicenetworking/ci.mgmt.yml + - sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/signalr/ci.mgmt.yml b/sdk/signalr/ci.mgmt.yml index c934ed4314fa0..f066849c56a1e 100644 --- a/sdk/signalr/ci.mgmt.yml +++ b/sdk/signalr/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/signalr/ci.mgmt.yml - sdk/signalr/Azure.ResourceManager.SignalR/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/signalr/ci.mgmt.yml + - sdk/signalr/Azure.ResourceManager.SignalR/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/sphere/ci.mgmt.yml b/sdk/sphere/ci.mgmt.yml index f3f33e9d00f4c..749774244735e 100644 --- a/sdk/sphere/ci.mgmt.yml +++ b/sdk/sphere/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/sphere/ci.mgmt.yml - sdk/sphere/Azure.ResourceManager.Sphere/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/sphere/ci.mgmt.yml + - sdk/sphere/Azure.ResourceManager.Sphere/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/springappdiscovery/ci.mgmt.yml b/sdk/springappdiscovery/ci.mgmt.yml index 7676386684dfa..f86c14368089d 100644 --- a/sdk/springappdiscovery/ci.mgmt.yml +++ b/sdk/springappdiscovery/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/springappdiscovery/ci.mgmt.yml - sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/springappdiscovery/ci.mgmt.yml + - sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/sqlmanagement/ci.mgmt.yml b/sdk/sqlmanagement/ci.mgmt.yml index da93d03f2d33c..8377a26636817 100644 --- a/sdk/sqlmanagement/ci.mgmt.yml +++ b/sdk/sqlmanagement/ci.mgmt.yml @@ -2,6 +2,7 @@ # This file is generated automatically and any changes will be lost. trigger: none + pr: branches: include: @@ -14,6 +15,18 @@ pr: - sdk/sqlmanagement/ci.mgmt.yml - sdk/sqlmanagement/Azure.ResourceManager.Sql/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/sqlmanagement/ci.mgmt.yml + - sdk/sqlmanagement/Azure.ResourceManager.Sql/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/sqlvirtualmachine/ci.mgmt.yml b/sdk/sqlvirtualmachine/ci.mgmt.yml index 28c6192fa86bb..049e315855ed2 100644 --- a/sdk/sqlvirtualmachine/ci.mgmt.yml +++ b/sdk/sqlvirtualmachine/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/sqlvirtualmachine/ci.mgmt.yml - sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/sqlvirtualmachine/ci.mgmt.yml + - sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/standbypool/ci.mgmt.yml b/sdk/standbypool/ci.mgmt.yml index 0763a516e2c10..54ce1137a1237 100644 --- a/sdk/standbypool/ci.mgmt.yml +++ b/sdk/standbypool/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/standbypool/ci.mgmt.yml - sdk/standbypool/Azure.ResourceManager.StandbyPool/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/standbypool/ci.mgmt.yml + - sdk/standbypool/Azure.ResourceManager.StandbyPool/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/storage/ci.mgmt.yml b/sdk/storage/ci.mgmt.yml index 95bc19b325d58..6f05608983be5 100644 --- a/sdk/storage/ci.mgmt.yml +++ b/sdk/storage/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/storage/ci.mgmt.yml - sdk/storage/Azure.ResourceManager.Storage/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/storage/ci.mgmt.yml + - sdk/storage/Azure.ResourceManager.Storage/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/storageactions/ci.mgmt.yml b/sdk/storageactions/ci.mgmt.yml index 27062b4565a8a..b27838343a2ed 100644 --- a/sdk/storageactions/ci.mgmt.yml +++ b/sdk/storageactions/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/storageactions/ci.mgmt.yml - sdk/storageactions/Azure.ResourceManager.StorageActions/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/storageactions/ci.mgmt.yml + - sdk/storageactions/Azure.ResourceManager.StorageActions/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/storagecache/ci.mgmt.yml b/sdk/storagecache/ci.mgmt.yml index c6abf63baf2cd..84c9229409396 100644 --- a/sdk/storagecache/ci.mgmt.yml +++ b/sdk/storagecache/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/storagecache/ci.mgmt.yml - sdk/storagecache/Azure.ResourceManager.StorageCache/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/storagecache/ci.mgmt.yml + - sdk/storagecache/Azure.ResourceManager.StorageCache/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/storagemover/ci.mgmt.yml b/sdk/storagemover/ci.mgmt.yml index e9055f49e1a91..4e45261a60aa9 100644 --- a/sdk/storagemover/ci.mgmt.yml +++ b/sdk/storagemover/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/storagemover/ci.mgmt.yml - sdk/storagemover/Azure.ResourceManager.StorageMover/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/storagemover/ci.mgmt.yml + - sdk/storagemover/Azure.ResourceManager.StorageMover/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/storagepool/ci.mgmt.yml b/sdk/storagepool/ci.mgmt.yml index 2178fc3907573..6592a12a262a3 100644 --- a/sdk/storagepool/ci.mgmt.yml +++ b/sdk/storagepool/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/storagepool/ci.mgmt.yml - sdk/storagepool/Azure.ResourceManager.StoragePool/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/storagepool/ci.mgmt.yml + - sdk/storagepool/Azure.ResourceManager.StoragePool/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/storagesync/ci.mgmt.yml b/sdk/storagesync/ci.mgmt.yml index a8789947c687f..b9fcbb66b30fb 100644 --- a/sdk/storagesync/ci.mgmt.yml +++ b/sdk/storagesync/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/storagesync/ci.mgmt.yml - sdk/storagesync/Azure.ResourceManager.StorageSync/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/storagesync/ci.mgmt.yml + - sdk/storagesync/Azure.ResourceManager.StorageSync/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/streamanalytics/ci.mgmt.yml b/sdk/streamanalytics/ci.mgmt.yml index 09d108a1a7d9e..860cd851bbd15 100644 --- a/sdk/streamanalytics/ci.mgmt.yml +++ b/sdk/streamanalytics/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/streamanalytics/ci.mgmt.yml - sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/streamanalytics/ci.mgmt.yml + - sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/subscription/ci.mgmt.yml b/sdk/subscription/ci.mgmt.yml index f9067b4c0af38..a00a0e9c56ad9 100644 --- a/sdk/subscription/ci.mgmt.yml +++ b/sdk/subscription/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/subscription/ci.mgmt.yml - sdk/subscription/Azure.ResourceManager.Subscription/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/subscription/ci.mgmt.yml + - sdk/subscription/Azure.ResourceManager.Subscription/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/support/ci.mgmt.yml b/sdk/support/ci.mgmt.yml index 5a947c4c49390..d5c857ad83466 100644 --- a/sdk/support/ci.mgmt.yml +++ b/sdk/support/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/support/ci.mgmt.yml - sdk/support/Azure.ResourceManager.Support/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/support/ci.mgmt.yml + - sdk/support/Azure.ResourceManager.Support/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/synapse/ci.mgmt.yml b/sdk/synapse/ci.mgmt.yml index 0a089a5042915..18c8132c48039 100644 --- a/sdk/synapse/ci.mgmt.yml +++ b/sdk/synapse/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/synapse/ci.mgmt.yml - sdk/synapse/Azure.ResourceManager.Synapse/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/synapse/ci.mgmt.yml + - sdk/synapse/Azure.ResourceManager.Synapse/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/terraform/ci.mgmt.yml b/sdk/terraform/ci.mgmt.yml index 82c4c1f05a4c5..5f7b3d41fb27b 100644 --- a/sdk/terraform/ci.mgmt.yml +++ b/sdk/terraform/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/terraform/ci.mgmt.yml - sdk/terraform/Azure.ResourceManager.Terraform/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/terraform/ci.mgmt.yml + - sdk/terraform/Azure.ResourceManager.Terraform/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/trafficmanager/ci.mgmt.yml b/sdk/trafficmanager/ci.mgmt.yml index 528f78b70b969..86b17c08ac4e9 100644 --- a/sdk/trafficmanager/ci.mgmt.yml +++ b/sdk/trafficmanager/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/trafficmanager/ci.mgmt.yml - sdk/trafficmanager/Azure.ResourceManager.TrafficManager/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/trafficmanager/ci.mgmt.yml + - sdk/trafficmanager/Azure.ResourceManager.TrafficManager/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/trustedsigning/ci.mgmt.yml b/sdk/trustedsigning/ci.mgmt.yml index 5b67358a44777..07fb171ee4164 100644 --- a/sdk/trustedsigning/ci.mgmt.yml +++ b/sdk/trustedsigning/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/trustedsigning/ci.mgmt.yml - sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/trustedsigning/ci.mgmt.yml + - sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/voiceservices/ci.mgmt.yml b/sdk/voiceservices/ci.mgmt.yml index a914d1640296a..64ea2eb63c0fc 100644 --- a/sdk/voiceservices/ci.mgmt.yml +++ b/sdk/voiceservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/voiceservices/ci.mgmt.yml - sdk/voiceservices/Azure.ResourceManager.VoiceServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/voiceservices/ci.mgmt.yml + - sdk/voiceservices/Azure.ResourceManager.VoiceServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/webpubsub/ci.mgmt.yml b/sdk/webpubsub/ci.mgmt.yml index 6bcb8439a2b05..a312a96feb5ab 100644 --- a/sdk/webpubsub/ci.mgmt.yml +++ b/sdk/webpubsub/ci.mgmt.yml @@ -1,5 +1,6 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -12,6 +13,18 @@ pr: - sdk/webpubsub/ci.mgmt.yml - sdk/webpubsub/Azure.ResourceManager.WebPubSub/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/webpubsub/ci.mgmt.yml + - sdk/webpubsub/Azure.ResourceManager.WebPubSub/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/websites/ci.mgmt.yml b/sdk/websites/ci.mgmt.yml index d67c580bc414e..4dbf184acc87a 100644 --- a/sdk/websites/ci.mgmt.yml +++ b/sdk/websites/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/websites/ci.mgmt.yml - sdk/websites/Azure.ResourceManager.AppService/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/websites/ci.mgmt.yml + - sdk/websites/Azure.ResourceManager.AppService/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/workloadmonitor/ci.mgmt.yml b/sdk/workloadmonitor/ci.mgmt.yml index 7c6a51fbe75c4..e834be340ea9f 100644 --- a/sdk/workloadmonitor/ci.mgmt.yml +++ b/sdk/workloadmonitor/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/workloadmonitor/ci.mgmt.yml - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/workloadmonitor/ci.mgmt.yml + - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/workloads/ci.mgmt.yml b/sdk/workloads/ci.mgmt.yml index e3457d69ceaa9..bf39830534736 100644 --- a/sdk/workloads/ci.mgmt.yml +++ b/sdk/workloads/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/workloads/ci.mgmt.yml - sdk/workloads/Azure.ResourceManager.Workloads/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/workloads/ci.mgmt.yml + - sdk/workloads/Azure.ResourceManager.Workloads/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: