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/contoso/Azure.ResourceManager.Contoso/Azure.ResourceManager.Contoso.sln b/sdk/contoso/Azure.ResourceManager.Contoso/Azure.ResourceManager.Contoso.sln
new file mode 100644
index 0000000000000..e101973e4a928
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/Azure.ResourceManager.Contoso.sln
@@ -0,0 +1,56 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29709.97
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{ECC730C1-4AEA-420C-916A-66B19B79E4DC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.Contoso", "src\Azure.ResourceManager.Contoso.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.Contoso.Tests", "tests\Azure.ResourceManager.Contoso.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU
+ {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/contoso/Azure.ResourceManager.Contoso/CHANGELOG.md b/sdk/contoso/Azure.ResourceManager.Contoso/CHANGELOG.md
new file mode 100644
index 0000000000000..13dd08af78abe
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/CHANGELOG.md
@@ -0,0 +1,11 @@
+# Release History
+
+## 1.0.0-beta.1 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/Directory.Build.props b/sdk/contoso/Azure.ResourceManager.Contoso/Directory.Build.props
new file mode 100644
index 0000000000000..63bd836ad44b7
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/Directory.Build.props
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/README.md b/sdk/contoso/Azure.ResourceManager.Contoso/README.md
new file mode 100644
index 0000000000000..66daccdec8ae9
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/README.md
@@ -0,0 +1,86 @@
+# Azure.ResourceManager.Contoso client library for .NET
+
+Azure.ResourceManager.Contoso 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/contoso/Azure.ResourceManager.Contoso/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.ResourceManager.Contoso --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.
+
+## 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/contoso/Azure.ResourceManager.Contoso/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/contoso/Azure.ResourceManager.Contoso/README.png)
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.net8.0.cs b/sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.net8.0.cs
new file mode 100644
index 0000000000000..e066d059b9ab7
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.net8.0.cs
@@ -0,0 +1,131 @@
+namespace Azure.ResourceManager.Contoso
+{
+ public static partial class ContosoExtensions
+ {
+ public static Azure.Response GetEmployee(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public static System.Threading.Tasks.Task> GetEmployeeAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public static Azure.ResourceManager.Contoso.EmployeeResource GetEmployeeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; }
+ public static Azure.ResourceManager.Contoso.EmployeeCollection GetEmployees(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; }
+ public static Azure.Pageable GetEmployees(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public static Azure.AsyncPageable GetEmployeesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ }
+ public partial class EmployeeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable
+ {
+ protected EmployeeCollection() { }
+ public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string employeeName, Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string employeeName, Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Exists(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> ExistsAsync(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Get(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetAsync(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.NullableResponse GetIfExists(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; }
+ System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; }
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
+ }
+ public partial class EmployeeData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ public EmployeeData(Azure.Core.AzureLocation location) { }
+ public Azure.ResourceManager.Contoso.Models.EmployeeProperties Properties { get { throw null; } set { } }
+ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class EmployeeResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ public static readonly Azure.Core.ResourceType ResourceType;
+ protected EmployeeResource() { }
+ public virtual Azure.ResourceManager.Contoso.EmployeeData Data { get { throw null; } }
+ public virtual bool HasData { get { throw null; } }
+ public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string employeeName) { throw null; }
+ public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ public virtual Azure.Response Update(Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ }
+}
+namespace Azure.ResourceManager.Contoso.Mocking
+{
+ public partial class MockableContosoArmClient : Azure.ResourceManager.ArmResource
+ {
+ protected MockableContosoArmClient() { }
+ public virtual Azure.ResourceManager.Contoso.EmployeeResource GetEmployeeResource(Azure.Core.ResourceIdentifier id) { throw null; }
+ }
+ public partial class MockableContosoResourceGroupResource : Azure.ResourceManager.ArmResource
+ {
+ protected MockableContosoResourceGroupResource() { }
+ public virtual Azure.Response GetEmployee(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetEmployeeAsync(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.ResourceManager.Contoso.EmployeeCollection GetEmployees() { throw null; }
+ }
+ public partial class MockableContosoSubscriptionResource : Azure.ResourceManager.ArmResource
+ {
+ protected MockableContosoSubscriptionResource() { }
+ public virtual Azure.Pageable GetEmployees(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable GetEmployeesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ }
+}
+namespace Azure.ResourceManager.Contoso.Models
+{
+ public static partial class ArmContosoModelFactory
+ {
+ public static Azure.ResourceManager.Contoso.EmployeeData EmployeeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Contoso.Models.EmployeeProperties properties = null) { throw null; }
+ public static Azure.ResourceManager.Contoso.Models.EmployeeProperties EmployeeProperties(int? age = default(int?), string city = null, byte[] profile = null, Azure.ResourceManager.Contoso.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.Contoso.Models.ProvisioningState?)) { throw null; }
+ }
+ public partial class EmployeeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ public EmployeeProperties() { }
+ public int? Age { get { throw null; } set { } }
+ public string City { get { throw null; } set { } }
+ public byte[] Profile { get { throw null; } set { } }
+ public Azure.ResourceManager.Contoso.Models.ProvisioningState? ProvisioningState { get { throw null; } }
+ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Contoso.Models.EmployeeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Contoso.Models.EmployeeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public readonly partial struct ProvisioningState : System.IEquatable
+ {
+ private readonly object _dummy;
+ private readonly int _dummyPrimitive;
+ public ProvisioningState(string value) { throw null; }
+ public static Azure.ResourceManager.Contoso.Models.ProvisioningState Accepted { get { throw null; } }
+ public static Azure.ResourceManager.Contoso.Models.ProvisioningState Canceled { get { throw null; } }
+ public static Azure.ResourceManager.Contoso.Models.ProvisioningState Deleting { get { throw null; } }
+ public static Azure.ResourceManager.Contoso.Models.ProvisioningState Failed { get { throw null; } }
+ public static Azure.ResourceManager.Contoso.Models.ProvisioningState Provisioning { get { throw null; } }
+ public static Azure.ResourceManager.Contoso.Models.ProvisioningState Succeeded { get { throw null; } }
+ public static Azure.ResourceManager.Contoso.Models.ProvisioningState Updating { get { throw null; } }
+ public bool Equals(Azure.ResourceManager.Contoso.Models.ProvisioningState other) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override bool Equals(object obj) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override int GetHashCode() { throw null; }
+ public static bool operator ==(Azure.ResourceManager.Contoso.Models.ProvisioningState left, Azure.ResourceManager.Contoso.Models.ProvisioningState right) { throw null; }
+ public static implicit operator Azure.ResourceManager.Contoso.Models.ProvisioningState (string value) { throw null; }
+ public static bool operator !=(Azure.ResourceManager.Contoso.Models.ProvisioningState left, Azure.ResourceManager.Contoso.Models.ProvisioningState right) { throw null; }
+ public override string ToString() { throw null; }
+ }
+}
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.netstandard2.0.cs b/sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.netstandard2.0.cs
new file mode 100644
index 0000000000000..e066d059b9ab7
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/api/Azure.ResourceManager.Contoso.netstandard2.0.cs
@@ -0,0 +1,131 @@
+namespace Azure.ResourceManager.Contoso
+{
+ public static partial class ContosoExtensions
+ {
+ public static Azure.Response GetEmployee(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public static System.Threading.Tasks.Task> GetEmployeeAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public static Azure.ResourceManager.Contoso.EmployeeResource GetEmployeeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; }
+ public static Azure.ResourceManager.Contoso.EmployeeCollection GetEmployees(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; }
+ public static Azure.Pageable GetEmployees(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public static Azure.AsyncPageable GetEmployeesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ }
+ public partial class EmployeeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable
+ {
+ protected EmployeeCollection() { }
+ public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string employeeName, Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string employeeName, Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Exists(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> ExistsAsync(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Get(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetAsync(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.NullableResponse GetIfExists(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; }
+ System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; }
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
+ }
+ public partial class EmployeeData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ public EmployeeData(Azure.Core.AzureLocation location) { }
+ public Azure.ResourceManager.Contoso.Models.EmployeeProperties Properties { get { throw null; } set { } }
+ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ public partial class EmployeeResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ public static readonly Azure.Core.ResourceType ResourceType;
+ protected EmployeeResource() { }
+ public virtual Azure.ResourceManager.Contoso.EmployeeData Data { get { throw null; } }
+ public virtual bool HasData { get { throw null; } }
+ public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string employeeName) { throw null; }
+ public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Contoso.EmployeeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ public virtual Azure.Response Update(Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Contoso.EmployeeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ }
+}
+namespace Azure.ResourceManager.Contoso.Mocking
+{
+ public partial class MockableContosoArmClient : Azure.ResourceManager.ArmResource
+ {
+ protected MockableContosoArmClient() { }
+ public virtual Azure.ResourceManager.Contoso.EmployeeResource GetEmployeeResource(Azure.Core.ResourceIdentifier id) { throw null; }
+ }
+ public partial class MockableContosoResourceGroupResource : Azure.ResourceManager.ArmResource
+ {
+ protected MockableContosoResourceGroupResource() { }
+ public virtual Azure.Response GetEmployee(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual System.Threading.Tasks.Task> GetEmployeeAsync(string employeeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.ResourceManager.Contoso.EmployeeCollection GetEmployees() { throw null; }
+ }
+ public partial class MockableContosoSubscriptionResource : Azure.ResourceManager.ArmResource
+ {
+ protected MockableContosoSubscriptionResource() { }
+ public virtual Azure.Pageable GetEmployees(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ public virtual Azure.AsyncPageable GetEmployeesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ }
+}
+namespace Azure.ResourceManager.Contoso.Models
+{
+ public static partial class ArmContosoModelFactory
+ {
+ public static Azure.ResourceManager.Contoso.EmployeeData EmployeeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Contoso.Models.EmployeeProperties properties = null) { throw null; }
+ public static Azure.ResourceManager.Contoso.Models.EmployeeProperties EmployeeProperties(int? age = default(int?), string city = null, byte[] profile = null, Azure.ResourceManager.Contoso.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.Contoso.Models.ProvisioningState?)) { throw null; }
+ }
+ public partial class EmployeeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel
+ {
+ public EmployeeProperties() { }
+ public int? Age { get { throw null; } set { } }
+ public string City { get { throw null; } set { } }
+ public byte[] Profile { get { throw null; } set { } }
+ public Azure.ResourceManager.Contoso.Models.ProvisioningState? ProvisioningState { get { throw null; } }
+ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Contoso.Models.EmployeeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
+ Azure.ResourceManager.Contoso.Models.EmployeeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
+ }
+ [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
+ public readonly partial struct ProvisioningState : System.IEquatable
+ {
+ private readonly object _dummy;
+ private readonly int _dummyPrimitive;
+ public ProvisioningState(string value) { throw null; }
+ public static Azure.ResourceManager.Contoso.Models.ProvisioningState Accepted { get { throw null; } }
+ public static Azure.ResourceManager.Contoso.Models.ProvisioningState Canceled { get { throw null; } }
+ public static Azure.ResourceManager.Contoso.Models.ProvisioningState Deleting { get { throw null; } }
+ public static Azure.ResourceManager.Contoso.Models.ProvisioningState Failed { get { throw null; } }
+ public static Azure.ResourceManager.Contoso.Models.ProvisioningState Provisioning { get { throw null; } }
+ public static Azure.ResourceManager.Contoso.Models.ProvisioningState Succeeded { get { throw null; } }
+ public static Azure.ResourceManager.Contoso.Models.ProvisioningState Updating { get { throw null; } }
+ public bool Equals(Azure.ResourceManager.Contoso.Models.ProvisioningState other) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override bool Equals(object obj) { throw null; }
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+ public override int GetHashCode() { throw null; }
+ public static bool operator ==(Azure.ResourceManager.Contoso.Models.ProvisioningState left, Azure.ResourceManager.Contoso.Models.ProvisioningState right) { throw null; }
+ public static implicit operator Azure.ResourceManager.Contoso.Models.ProvisioningState (string value) { throw null; }
+ public static bool operator !=(Azure.ResourceManager.Contoso.Models.ProvisioningState left, Azure.ResourceManager.Contoso.Models.ProvisioningState right) { throw null; }
+ public override string ToString() { throw null; }
+ }
+}
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeCollection.cs b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeCollection.cs
new file mode 100644
index 0000000000000..05ffe09855ae3
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeCollection.cs
@@ -0,0 +1,206 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Text;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.Contoso.Models;
+using Azure.ResourceManager.Resources;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Contoso.Samples
+{
+ public partial class Sample_EmployeeCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_EmployeesCreateOrUpdate()
+ {
+ // Generated from example definition: 2021-10-01-preview/Employees_CreateOrUpdate.json
+ // this example is just showing the usage of "Employee_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9";
+ string resourceGroupName = "rgopenapi";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this EmployeeResource
+ EmployeeCollection collection = resourceGroupResource.GetEmployees();
+
+ // invoke the operation
+ string employeeName = "9KF-f-8b";
+ EmployeeData data = new EmployeeData(new AzureLocation("itajgxyqozseoygnl"))
+ {
+ Properties = new EmployeeProperties
+ {
+ Age = 30,
+ City = "gydhnntudughbmxlkyzrskcdkotrxn",
+ Profile = Encoding.UTF8.GetBytes("ms"),
+ },
+ Tags =
+{
+["key2913"] = "urperxmkkhhkp"
+},
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, employeeName, data);
+ EmployeeResource result = lro.Value;
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ EmployeeData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_EmployeesGet()
+ {
+ // Generated from example definition: 2021-10-01-preview/Employees_Get.json
+ // this example is just showing the usage of "Employee_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9";
+ string resourceGroupName = "rgopenapi";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this EmployeeResource
+ EmployeeCollection collection = resourceGroupResource.GetEmployees();
+
+ // invoke the operation
+ string employeeName = "le-8MU--J3W6q8D386p3-iT3";
+ EmployeeResource result = await collection.GetAsync(employeeName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ EmployeeData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAll_EmployeesListByResourceGroup()
+ {
+ // Generated from example definition: 2021-10-01-preview/Employees_ListByResourceGroup.json
+ // this example is just showing the usage of "Employee_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9";
+ string resourceGroupName = "rgopenapi";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this EmployeeResource
+ EmployeeCollection collection = resourceGroupResource.GetEmployees();
+
+ // invoke the operation and iterate over the result
+ await foreach (EmployeeResource item in collection.GetAllAsync())
+ {
+ // the variable item is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ EmployeeData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_EmployeesGet()
+ {
+ // Generated from example definition: 2021-10-01-preview/Employees_Get.json
+ // this example is just showing the usage of "Employee_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9";
+ string resourceGroupName = "rgopenapi";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this EmployeeResource
+ EmployeeCollection collection = resourceGroupResource.GetEmployees();
+
+ // invoke the operation
+ string employeeName = "le-8MU--J3W6q8D386p3-iT3";
+ bool result = await collection.ExistsAsync(employeeName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_EmployeesGet()
+ {
+ // Generated from example definition: 2021-10-01-preview/Employees_Get.json
+ // this example is just showing the usage of "Employee_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9";
+ string resourceGroupName = "rgopenapi";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this EmployeeResource
+ EmployeeCollection collection = resourceGroupResource.GetEmployees();
+
+ // invoke the operation
+ string employeeName = "le-8MU--J3W6q8D386p3-iT3";
+ NullableResponse response = await collection.GetIfExistsAsync(employeeName);
+ EmployeeResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine("Succeeded with null as result");
+ }
+ else
+ {
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ EmployeeData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeResource.cs b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeResource.cs
new file mode 100644
index 0000000000000..d1bbd7a38faba
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_EmployeeResource.cs
@@ -0,0 +1,119 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Text;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.Contoso.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Contoso.Samples
+{
+ public partial class Sample_EmployeeResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_EmployeesGet()
+ {
+ // Generated from example definition: 2021-10-01-preview/Employees_Get.json
+ // this example is just showing the usage of "Employee_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this EmployeeResource created on azure
+ // for more information of creating EmployeeResource, please refer to the document of EmployeeResource
+ string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9";
+ string resourceGroupName = "rgopenapi";
+ string employeeName = "le-8MU--J3W6q8D386p3-iT3";
+ ResourceIdentifier employeeResourceId = EmployeeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, employeeName);
+ EmployeeResource employee = client.GetEmployeeResource(employeeResourceId);
+
+ // invoke the operation
+ EmployeeResource result = await employee.GetAsync();
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ EmployeeData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Delete_EmployeesDelete()
+ {
+ // Generated from example definition: 2021-10-01-preview/Employees_Delete.json
+ // this example is just showing the usage of "Employee_Delete" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this EmployeeResource created on azure
+ // for more information of creating EmployeeResource, please refer to the document of EmployeeResource
+ string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9";
+ string resourceGroupName = "rgopenapi";
+ string employeeName = "5vX--BxSu3ux48rI4O9OQ569";
+ ResourceIdentifier employeeResourceId = EmployeeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, employeeName);
+ EmployeeResource employee = client.GetEmployeeResource(employeeResourceId);
+
+ // invoke the operation
+ await employee.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_EmployeesUpdate()
+ {
+ // Generated from example definition: 2021-10-01-preview/Employees_Update.json
+ // this example is just showing the usage of "Employee_Update" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this EmployeeResource created on azure
+ // for more information of creating EmployeeResource, please refer to the document of EmployeeResource
+ string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9";
+ string resourceGroupName = "rgopenapi";
+ string employeeName = "-XhyNJ--";
+ ResourceIdentifier employeeResourceId = EmployeeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, employeeName);
+ EmployeeResource employee = client.GetEmployeeResource(employeeResourceId);
+
+ // invoke the operation
+ EmployeeData data = new EmployeeData(default)
+ {
+ Properties = new EmployeeProperties
+ {
+ Age = 24,
+ City = "uyfg",
+ Profile = Encoding.UTF8.GetBytes("oapgijcswfkruiuuzbwco"),
+ },
+ Tags =
+{
+["key7952"] = "no"
+},
+ };
+ EmployeeResource result = await employee.UpdateAsync(data);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ EmployeeData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs
new file mode 100644
index 0000000000000..d410497d151b8
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.Resources;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Contoso.Samples
+{
+ public partial class Sample_SubscriptionResourceExtensions
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetEmployees_EmployeesListBySubscription()
+ {
+ // Generated from example definition: 2021-10-01-preview/Employees_ListBySubscription.json
+ // this example is just showing the usage of "Employee_ListBySubscription" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "11809CA1-E126-4017-945E-AA795CD5C5A9";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (EmployeeResource item in subscriptionResource.GetEmployeesAsync())
+ {
+ // the variable item is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ EmployeeData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+ }
+}
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Azure.ResourceManager.Contoso.csproj b/sdk/contoso/Azure.ResourceManager.Contoso/src/Azure.ResourceManager.Contoso.csproj
new file mode 100644
index 0000000000000..560614ee1a308
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Azure.ResourceManager.Contoso.csproj
@@ -0,0 +1,10 @@
+
+
+ This is the Azure.ResourceManager.Contoso client library for developing .NET applications with rich experience.
+ Azure SDK Code Generation Azure.ResourceManager.Contoso for Azure Data Plane
+ 1.0.0-beta.1
+ Azure.ResourceManager.Contoso
+ $(RequiredTargetFrameworks)
+ true
+
+
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/ArmContosoModelFactory.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/ArmContosoModelFactory.cs
new file mode 100644
index 0000000000000..836b121b3967e
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/ArmContosoModelFactory.cs
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Azure.Core;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.Contoso.Models
+{
+ /// Model factory for models.
+ public static partial class ArmContosoModelFactory
+ {
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static EmployeeData EmployeeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, EmployeeProperties properties = null)
+ {
+ tags ??= new Dictionary();
+
+ return new EmployeeData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ tags,
+ location,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Age of employee.
+ /// City of employee.
+ /// Profile of employee.
+ /// The status of the last operation.
+ /// A new instance for mocking.
+ public static EmployeeProperties EmployeeProperties(int? age = null, string city = null, byte[] profile = null, ProvisioningState? provisioningState = null)
+ {
+ return new EmployeeProperties(age, city, profile, provisioningState, serializedAdditionalRawData: null);
+ }
+ }
+}
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeCollection.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeCollection.cs
new file mode 100644
index 0000000000000..a73a419e17acd
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeCollection.cs
@@ -0,0 +1,494 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.Contoso
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get an instance call the GetEmployees method from an instance of .
+ ///
+ public partial class EmployeeCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _employeeClientDiagnostics;
+ private readonly EmployeesRestOperations _employeeRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected EmployeeCollection()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the parent resource that is the target of operations.
+ internal EmployeeCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _employeeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Contoso", EmployeeResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(EmployeeResource.ResourceType, out string employeeApiVersion);
+ _employeeRestClient = new EmployeesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, employeeApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceGroupResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// Create a Employee
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the Employee.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string employeeName, EmployeeData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _employeeRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, employeeName, data, cancellationToken).ConfigureAwait(false);
+ var operation = new ContosoArmOperation(new EmployeeOperationSource(Client), _employeeClientDiagnostics, Pipeline, _employeeRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, employeeName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create a Employee
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the Employee.
+ /// Resource create parameters.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string employeeName, EmployeeData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _employeeRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, employeeName, data, cancellationToken);
+ var operation = new ContosoArmOperation(new EmployeeOperationSource(Client), _employeeClientDiagnostics, Pipeline, _employeeRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, employeeName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a Employee
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Employee.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string employeeName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName));
+
+ using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, employeeName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a Employee
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Employee.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string employeeName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName));
+
+ using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, employeeName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// List Employee resources by resource group
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_ListByResourceGroup
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _employeeRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _employeeRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EmployeeResource(Client, EmployeeData.DeserializeEmployeeData(e)), _employeeClientDiagnostics, Pipeline, "EmployeeCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List Employee resources by resource group
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_ListByResourceGroup
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _employeeRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _employeeRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EmployeeResource(Client, EmployeeData.DeserializeEmployeeData(e)), _employeeClientDiagnostics, Pipeline, "EmployeeCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Employee.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string employeeName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName));
+
+ using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, employeeName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Employee.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string employeeName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName));
+
+ using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, employeeName, cancellationToken: cancellationToken);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Employee.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string employeeName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName));
+
+ using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, employeeName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Employee.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string employeeName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(employeeName, nameof(employeeName));
+
+ using var scope = _employeeClientDiagnostics.CreateScope("EmployeeCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, employeeName, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ {
+ return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.Serialization.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.Serialization.cs
new file mode 100644
index 0000000000000..bae86a5377cdc
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.Serialization.cs
@@ -0,0 +1,178 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.Contoso.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.Contoso
+{
+ public partial class EmployeeData : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(EmployeeData)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(Properties))
+ {
+ writer.WritePropertyName("properties"u8);
+ writer.WriteObjectValue(Properties, options);
+ }
+ }
+
+ EmployeeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(EmployeeData)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeEmployeeData(document.RootElement, options);
+ }
+
+ internal static EmployeeData DeserializeEmployeeData(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ EmployeeProperties properties = default;
+ IDictionary tags = default;
+ AzureLocation location = default;
+ ResourceIdentifier id = default;
+ string name = default;
+ ResourceType type = default;
+ SystemData systemData = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("properties"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ properties = EmployeeProperties.DeserializeEmployeeProperties(property.Value, options);
+ continue;
+ }
+ if (property.NameEquals("tags"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ Dictionary dictionary = new Dictionary();
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ dictionary.Add(property0.Name, property0.Value.GetString());
+ }
+ tags = dictionary;
+ continue;
+ }
+ if (property.NameEquals("location"u8))
+ {
+ location = new AzureLocation(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("id"u8))
+ {
+ id = new ResourceIdentifier(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"u8))
+ {
+ type = new ResourceType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("systemData"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemData = JsonSerializer.Deserialize(property.Value.GetRawText());
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new EmployeeData(
+ id,
+ name,
+ type,
+ systemData,
+ tags ?? new ChangeTrackingDictionary(),
+ location,
+ properties,
+ serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(EmployeeData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ EmployeeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data);
+ return DeserializeEmployeeData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(EmployeeData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.cs
new file mode 100644
index 0000000000000..081bdf1fe2c77
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeData.cs
@@ -0,0 +1,83 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+using Azure.ResourceManager.Contoso.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.Contoso
+{
+ ///
+ /// A class representing the Employee data model.
+ /// Employee resource
+ ///
+ public partial class EmployeeData : TrackedResourceData
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ /// The location.
+ public EmployeeData(AzureLocation location) : base(location)
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// The resource-specific properties for this resource.
+ /// Keeps track of any properties unknown to the library.
+ internal EmployeeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, EmployeeProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
+ {
+ Properties = properties;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal EmployeeData()
+ {
+ }
+
+ /// The resource-specific properties for this resource.
+ public EmployeeProperties Properties { get; set; }
+ }
+}
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.Serialization.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.Serialization.cs
new file mode 100644
index 0000000000000..9ba6d75f170e3
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.Serialization.cs
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Text.Json;
+
+namespace Azure.ResourceManager.Contoso
+{
+ public partial class EmployeeResource : IJsonModel
+ {
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ EmployeeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options);
+
+ EmployeeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.cs
new file mode 100644
index 0000000000000..06b354fc18e31
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/EmployeeResource.cs
@@ -0,0 +1,698 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.Contoso
+{
+ ///
+ /// A Class representing an Employee along with the instance operations that can be performed on it.
+ /// If you have a you can construct an
+ /// from an instance of using the GetEmployeeResource method.
+ /// Otherwise you can get one from its parent resource using the GetEmployee method.
+ ///
+ public partial class EmployeeResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The subscriptionId.
+ /// The resourceGroupName.
+ /// The employeeName.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string employeeName)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _employeeClientDiagnostics;
+ private readonly EmployeesRestOperations _employeeRestClient;
+ private readonly EmployeeData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.Contoso/employees";
+
+ /// Initializes a new instance of the class for mocking.
+ protected EmployeeResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal EmployeeResource(ArmClient client, EmployeeData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal EmployeeResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _employeeClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Contoso", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string employeeApiVersion);
+ _employeeRestClient = new EmployeesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, employeeApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ /// Throws if there is no data loaded in the current instance.
+ public virtual EmployeeData Data
+ {
+ get
+ {
+ if (!HasData)
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ return _data;
+ }
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
+ }
+
+ ///
+ /// Get a Employee
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a Employee
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a Employee
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _employeeRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new ContosoArmOperation(_employeeClientDiagnostics, Pipeline, _employeeRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete a Employee
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _employeeRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ var operation = new ContosoArmOperation(_employeeClientDiagnostics, Pipeline, _employeeRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Update a Employee
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Update
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The resource properties to be updated.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(EmployeeData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _employeeRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Update a Employee
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Update
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The resource properties to be updated.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual Response Update(EmployeeData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _employeeRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken);
+ return Response.FromValue(new EmployeeResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Add a tag to the current resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The value for the tag.
+ /// The cancellation token to use.
+ /// or is null.
+ public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+ Argument.AssertNotNull(value, nameof(value));
+
+ using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.AddTag");
+ scope.Start();
+ try
+ {
+ if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false))
+ {
+ var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false);
+ originalTags.Value.Data.TagValues[key] = value;
+ await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalResponse = await _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ var patch = new EmployeeData(current.Location);
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags[key] = value;
+ var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return result;
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Add a tag to the current resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The value for the tag.
+ /// The cancellation token to use.
+ /// or is null.
+ public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+ Argument.AssertNotNull(value, nameof(value));
+
+ using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.AddTag");
+ scope.Start();
+ try
+ {
+ if (CanUseTagResource(cancellationToken: cancellationToken))
+ {
+ var originalTags = GetTagResource().Get(cancellationToken);
+ originalTags.Value.Data.TagValues[key] = value;
+ GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken);
+ var originalResponse = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = Get(cancellationToken: cancellationToken).Value.Data;
+ var patch = new EmployeeData(current.Location);
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags[key] = value;
+ var result = Update(patch, cancellationToken: cancellationToken);
+ return result;
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Replace the tags on the resource with the given set.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The set of tags to use as replacement.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tags, nameof(tags));
+
+ using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.SetTags");
+ scope.Start();
+ try
+ {
+ if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false))
+ {
+ await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false);
+ originalTags.Value.Data.TagValues.ReplaceWith(tags);
+ await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalResponse = await _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ var patch = new EmployeeData(current.Location);
+ patch.Tags.ReplaceWith(tags);
+ var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return result;
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Replace the tags on the resource with the given set.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The set of tags to use as replacement.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tags, nameof(tags));
+
+ using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.SetTags");
+ scope.Start();
+ try
+ {
+ if (CanUseTagResource(cancellationToken: cancellationToken))
+ {
+ GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken);
+ var originalTags = GetTagResource().Get(cancellationToken);
+ originalTags.Value.Data.TagValues.ReplaceWith(tags);
+ GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken);
+ var originalResponse = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = Get(cancellationToken: cancellationToken).Value.Data;
+ var patch = new EmployeeData(current.Location);
+ patch.Tags.ReplaceWith(tags);
+ var result = Update(patch, cancellationToken: cancellationToken);
+ return result;
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Removes a tag by key from the resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+
+ using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.RemoveTag");
+ scope.Start();
+ try
+ {
+ if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false))
+ {
+ var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false);
+ originalTags.Value.Data.TagValues.Remove(key);
+ await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalResponse = await _employeeRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ var patch = new EmployeeData(current.Location);
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags.Remove(key);
+ var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return result;
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Removes a tag by key from the resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+
+ using var scope = _employeeClientDiagnostics.CreateScope("EmployeeResource.RemoveTag");
+ scope.Start();
+ try
+ {
+ if (CanUseTagResource(cancellationToken: cancellationToken))
+ {
+ var originalTags = GetTagResource().Get(cancellationToken);
+ originalTags.Value.Data.TagValues.Remove(key);
+ GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken);
+ var originalResponse = _employeeRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return Response.FromValue(new EmployeeResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = Get(cancellationToken: cancellationToken).Value.Data;
+ var patch = new EmployeeData(current.Location);
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags.Remove(key);
+ var result = Update(patch, cancellationToken: cancellationToken);
+ return result;
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/ContosoExtensions.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/ContosoExtensions.cs
new file mode 100644
index 0000000000000..f67ef8dad5471
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/ContosoExtensions.cs
@@ -0,0 +1,219 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.ResourceManager.Contoso.Mocking;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.Contoso
+{
+ /// A class to add extension methods to Azure.ResourceManager.Contoso.
+ public static partial class ContosoExtensions
+ {
+ private static MockableContosoArmClient GetMockableContosoArmClient(ArmClient client)
+ {
+ return client.GetCachedClient(client0 => new MockableContosoArmClient(client0));
+ }
+
+ private static MockableContosoResourceGroupResource GetMockableContosoResourceGroupResource(ArmResource resource)
+ {
+ return resource.GetCachedClient(client => new MockableContosoResourceGroupResource(client, resource.Id));
+ }
+
+ private static MockableContosoSubscriptionResource GetMockableContosoSubscriptionResource(ArmResource resource)
+ {
+ return resource.GetCachedClient(client => new MockableContosoSubscriptionResource(client, resource.Id));
+ }
+
+ ///
+ /// Gets an object representing an along with the instance operations that can be performed on it but with no data.
+ /// You can use to create an from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static EmployeeResource GetEmployeeResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableContosoArmClient(client).GetEmployeeResource(id);
+ }
+
+ ///
+ /// Gets a collection of EmployeeResources in the ResourceGroupResource.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// is null.
+ /// An object representing collection of EmployeeResources and their operations over a EmployeeResource.
+ public static EmployeeCollection GetEmployees(this ResourceGroupResource resourceGroupResource)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return GetMockableContosoResourceGroupResource(resourceGroupResource).GetEmployees();
+ }
+
+ ///
+ /// Get a Employee
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Employee.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static async Task> GetEmployeeAsync(this ResourceGroupResource resourceGroupResource, string employeeName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return await GetMockableContosoResourceGroupResource(resourceGroupResource).GetEmployeeAsync(employeeName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get a Employee
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Employee.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static Response GetEmployee(this ResourceGroupResource resourceGroupResource, string employeeName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return GetMockableContosoResourceGroupResource(resourceGroupResource).GetEmployee(employeeName, cancellationToken);
+ }
+
+ ///
+ /// List Employee resources by subscription ID
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Contoso/employees
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_ListBySubscription
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The cancellation token to use.
+ /// is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetEmployeesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableContosoSubscriptionResource(subscriptionResource).GetEmployeesAsync(cancellationToken);
+ }
+
+ ///
+ /// List Employee resources by subscription ID
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Contoso/employees
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_ListBySubscription
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The cancellation token to use.
+ /// is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetEmployees(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableContosoSubscriptionResource(subscriptionResource).GetEmployees(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoArmClient.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoArmClient.cs
new file mode 100644
index 0000000000000..9dd8be4758d4e
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoArmClient.cs
@@ -0,0 +1,49 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using Azure.Core;
+
+namespace Azure.ResourceManager.Contoso.Mocking
+{
+ /// A class to add extension methods to ArmClient.
+ public partial class MockableContosoArmClient : ArmResource
+ {
+ /// Initializes a new instance of the class for mocking.
+ protected MockableContosoArmClient()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal MockableContosoArmClient(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ internal MockableContosoArmClient(ArmClient client) : this(client, ResourceIdentifier.Root)
+ {
+ }
+
+ private string GetApiVersionOrNull(ResourceType resourceType)
+ {
+ TryGetApiVersion(resourceType, out string apiVersion);
+ return apiVersion;
+ }
+
+ ///
+ /// Gets an object representing an along with the instance operations that can be performed on it but with no data.
+ /// You can use to create an from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual EmployeeResource GetEmployeeResource(ResourceIdentifier id)
+ {
+ EmployeeResource.ValidateResourceId(id);
+ return new EmployeeResource(Client, id);
+ }
+ }
+}
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoResourceGroupResource.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoResourceGroupResource.cs
new file mode 100644
index 0000000000000..cb6a28dbec372
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoResourceGroupResource.cs
@@ -0,0 +1,105 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+
+namespace Azure.ResourceManager.Contoso.Mocking
+{
+ /// A class to add extension methods to ResourceGroupResource.
+ public partial class MockableContosoResourceGroupResource : ArmResource
+ {
+ /// Initializes a new instance of the class for mocking.
+ protected MockableContosoResourceGroupResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal MockableContosoResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ private string GetApiVersionOrNull(ResourceType resourceType)
+ {
+ TryGetApiVersion(resourceType, out string apiVersion);
+ return apiVersion;
+ }
+
+ /// Gets a collection of EmployeeResources in the ResourceGroupResource.
+ /// An object representing collection of EmployeeResources and their operations over a EmployeeResource.
+ public virtual EmployeeCollection GetEmployees()
+ {
+ return GetCachedClient(client => new EmployeeCollection(client, Id));
+ }
+
+ ///
+ /// Get a Employee
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Employee.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetEmployeeAsync(string employeeName, CancellationToken cancellationToken = default)
+ {
+ return await GetEmployees().GetAsync(employeeName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get a Employee
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/employees/{employeeName}
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Employee.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetEmployee(string employeeName, CancellationToken cancellationToken = default)
+ {
+ return GetEmployees().Get(employeeName, cancellationToken);
+ }
+ }
+}
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoSubscriptionResource.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoSubscriptionResource.cs
new file mode 100644
index 0000000000000..c50eece144675
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Extensions/MockableContosoSubscriptionResource.cs
@@ -0,0 +1,102 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Threading;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.ResourceManager.Contoso.Mocking
+{
+ /// A class to add extension methods to SubscriptionResource.
+ public partial class MockableContosoSubscriptionResource : ArmResource
+ {
+ private ClientDiagnostics _employeeClientDiagnostics;
+ private EmployeesRestOperations _employeeRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected MockableContosoSubscriptionResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal MockableContosoSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ private ClientDiagnostics EmployeeClientDiagnostics => _employeeClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Contoso", EmployeeResource.ResourceType.Namespace, Diagnostics);
+ private EmployeesRestOperations EmployeeRestClient => _employeeRestClient ??= new EmployeesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EmployeeResource.ResourceType));
+
+ private string GetApiVersionOrNull(ResourceType resourceType)
+ {
+ TryGetApiVersion(resourceType, out string apiVersion);
+ return apiVersion;
+ }
+
+ ///
+ /// List Employee resources by subscription ID
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Contoso/employees
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_ListBySubscription
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetEmployeesAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => EmployeeRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EmployeeRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EmployeeResource(Client, EmployeeData.DeserializeEmployeeData(e)), EmployeeClientDiagnostics, Pipeline, "MockableContosoSubscriptionResource.GetEmployees", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List Employee resources by subscription ID
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Contoso/employees
+ ///
+ /// -
+ /// Operation Id
+ /// Employee_ListBySubscription
+ ///
+ /// -
+ /// Default Api Version
+ /// 2021-10-01-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetEmployees(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => EmployeeRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EmployeeRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EmployeeResource(Client, EmployeeData.DeserializeEmployeeData(e)), EmployeeClientDiagnostics, Pipeline, "MockableContosoSubscriptionResource.GetEmployees", "value", "nextLink", cancellationToken);
+ }
+ }
+}
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Argument.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Argument.cs
new file mode 100644
index 0000000000000..b146fadb78280
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/Argument.cs
@@ -0,0 +1,129 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.Contoso
+{
+ internal static class Argument
+ {
+ public static void AssertNotNull(T value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ }
+
+ public static void AssertNotNull(T? value, string name)
+ where T : struct
+ {
+ if (!value.HasValue)
+ {
+ throw new ArgumentNullException(name);
+ }
+ }
+
+ public static void AssertNotNullOrEmpty(IEnumerable value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (value is ICollection collectionOfT && collectionOfT.Count == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ if (value is ICollection collection && collection.Count == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ using IEnumerator e = value.GetEnumerator();
+ if (!e.MoveNext())
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ }
+
+ public static void AssertNotNullOrEmpty(string value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (value.Length == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty string.", name);
+ }
+ }
+
+ public static void AssertNotNullOrWhiteSpace(string value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (string.IsNullOrWhiteSpace(value))
+ {
+ throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name);
+ }
+ }
+
+ public static void AssertNotDefault(ref T value, string name)
+ where T : struct, IEquatable
+ {
+ if (value.Equals(default))
+ {
+ throw new ArgumentException("Value cannot be empty.", name);
+ }
+ }
+
+ public static void AssertInRange(T value, T minimum, T maximum, string name)
+ where T : notnull, IComparable
+ {
+ if (minimum.CompareTo(value) > 0)
+ {
+ throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed.");
+ }
+ if (maximum.CompareTo(value) < 0)
+ {
+ throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed.");
+ }
+ }
+
+ public static void AssertEnumDefined(Type enumType, object value, string name)
+ {
+ if (!Enum.IsDefined(enumType, value))
+ {
+ throw new ArgumentException($"Value not defined for {enumType.FullName}.", name);
+ }
+ }
+
+ public static T CheckNotNull(T value, string name)
+ where T : class
+ {
+ AssertNotNull(value, name);
+ return value;
+ }
+
+ public static string CheckNotNullOrEmpty(string value, string name)
+ {
+ AssertNotNullOrEmpty(value, name);
+ return value;
+ }
+
+ public static void AssertNull(T value, string name, string message = null)
+ {
+ if (value != null)
+ {
+ throw new ArgumentException(message ?? "Value must be null.", name);
+ }
+ }
+ }
+}
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingDictionary.cs
new file mode 100644
index 0000000000000..c2b481265f05e
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingDictionary.cs
@@ -0,0 +1,167 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.Contoso
+{
+ internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull
+ {
+ private IDictionary _innerDictionary;
+
+ public ChangeTrackingDictionary()
+ {
+ }
+
+ public ChangeTrackingDictionary(IDictionary dictionary)
+ {
+ if (dictionary == null)
+ {
+ return;
+ }
+ _innerDictionary = new Dictionary(dictionary);
+ }
+
+ public ChangeTrackingDictionary(IReadOnlyDictionary dictionary)
+ {
+ if (dictionary == null)
+ {
+ return;
+ }
+ _innerDictionary = new Dictionary();
+ foreach (var pair in dictionary)
+ {
+ _innerDictionary.Add(pair);
+ }
+ }
+
+ public bool IsUndefined => _innerDictionary == null;
+
+ public int Count => IsUndefined ? 0 : EnsureDictionary().Count;
+
+ public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly;
+
+ public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys;
+
+ public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values;
+
+ public TValue this[TKey key]
+ {
+ get
+ {
+ if (IsUndefined)
+ {
+ throw new KeyNotFoundException(nameof(key));
+ }
+ return EnsureDictionary()[key];
+ }
+ set
+ {
+ EnsureDictionary()[key] = value;
+ }
+ }
+
+ IEnumerable IReadOnlyDictionary.Keys => Keys;
+
+ IEnumerable IReadOnlyDictionary.Values => Values;
+
+ public IEnumerator> GetEnumerator()
+ {
+ if (IsUndefined)
+ {
+ IEnumerator> enumerateEmpty()
+ {
+ yield break;
+ }
+ return enumerateEmpty();
+ }
+ return EnsureDictionary().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ public void Add(KeyValuePair item)
+ {
+ EnsureDictionary().Add(item);
+ }
+
+ public void Clear()
+ {
+ EnsureDictionary().Clear();
+ }
+
+ public bool Contains(KeyValuePair item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().Contains(item);
+ }
+
+ public void CopyTo(KeyValuePair[] array, int index)
+ {
+ if (IsUndefined)
+ {
+ return;
+ }
+ EnsureDictionary().CopyTo(array, index);
+ }
+
+ public bool Remove(KeyValuePair item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().Remove(item);
+ }
+
+ public void Add(TKey key, TValue value)
+ {
+ EnsureDictionary().Add(key, value);
+ }
+
+ public bool ContainsKey(TKey key)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().ContainsKey(key);
+ }
+
+ public bool Remove(TKey key)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().Remove(key);
+ }
+
+ public bool TryGetValue(TKey key, out TValue value)
+ {
+ if (IsUndefined)
+ {
+ value = default;
+ return false;
+ }
+ return EnsureDictionary().TryGetValue(key, out value);
+ }
+
+ public IDictionary EnsureDictionary()
+ {
+ return _innerDictionary ??= new Dictionary();
+ }
+ }
+}
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingList.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingList.cs
new file mode 100644
index 0000000000000..28e10b878f860
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ChangeTrackingList.cs
@@ -0,0 +1,153 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Azure.ResourceManager.Contoso
+{
+ internal class ChangeTrackingList : IList, IReadOnlyList
+ {
+ private IList _innerList;
+
+ public ChangeTrackingList()
+ {
+ }
+
+ public ChangeTrackingList(IList innerList)
+ {
+ if (innerList != null)
+ {
+ _innerList = innerList;
+ }
+ }
+
+ public ChangeTrackingList(IReadOnlyList innerList)
+ {
+ if (innerList != null)
+ {
+ _innerList = innerList.ToList();
+ }
+ }
+
+ public bool IsUndefined => _innerList == null;
+
+ public int Count => IsUndefined ? 0 : EnsureList().Count;
+
+ public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly;
+
+ public T this[int index]
+ {
+ get
+ {
+ if (IsUndefined)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ return EnsureList()[index];
+ }
+ set
+ {
+ if (IsUndefined)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ EnsureList()[index] = value;
+ }
+ }
+
+ public void Reset()
+ {
+ _innerList = null;
+ }
+
+ public IEnumerator GetEnumerator()
+ {
+ if (IsUndefined)
+ {
+ IEnumerator enumerateEmpty()
+ {
+ yield break;
+ }
+ return enumerateEmpty();
+ }
+ return EnsureList().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ public void Add(T item)
+ {
+ EnsureList().Add(item);
+ }
+
+ public void Clear()
+ {
+ EnsureList().Clear();
+ }
+
+ public bool Contains(T item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureList().Contains(item);
+ }
+
+ public void CopyTo(T[] array, int arrayIndex)
+ {
+ if (IsUndefined)
+ {
+ return;
+ }
+ EnsureList().CopyTo(array, arrayIndex);
+ }
+
+ public bool Remove(T item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureList().Remove(item);
+ }
+
+ public int IndexOf(T item)
+ {
+ if (IsUndefined)
+ {
+ return -1;
+ }
+ return EnsureList().IndexOf(item);
+ }
+
+ public void Insert(int index, T item)
+ {
+ EnsureList().Insert(index, item);
+ }
+
+ public void RemoveAt(int index)
+ {
+ if (IsUndefined)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ EnsureList().RemoveAt(index);
+ }
+
+ public IList EnsureList()
+ {
+ return _innerList ??= new List();
+ }
+ }
+}
diff --git a/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/contoso/Azure.ResourceManager.Contoso/src/Generated/Internal/ModelSerializationExtensions.cs
new file mode 100644
index 0000000000000..02e26e5900f4b
--- /dev/null
+++ b/sdk/contoso/Azure.ResourceManager.Contoso/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.ResourceManager.Contoso
+{
+ 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