diff --git a/sdk/advisor/ci.mgmt.yml b/sdk/advisor/ci.mgmt.yml index 6b9f8d6952e6..22df99de35f2 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 ee27d71f9495..03a5f6399ccb 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 f33a90fffe5c..ad3a8d3d1efd 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 33729b962d88..d3774b358380 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 41c037327e33..4882d4409c0b 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 b72c80a2e0e6..2f766edb9528 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 d8a31e0139a8..7c3b00d97c17 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 a883eaefcd59..e53dd63aca0f 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 af82b66e6952..361f4019d322 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 1d28b9352b6c..023cebeb8d71 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 bbc2db0c9f63..53438df9d332 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 f6099036651c..d0de6d52b29a 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 51d1ac0c8240..595f887b2c35 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 7ac32fcc5543..9c9d9638348d 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 5a2467820b85..8e45b6506aa8 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 45bec5d1c196..b2cb0f44bf22 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 6404a2ba34ce..7030303dc9f4 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 fbe98927ef15..d9425419d2c3 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 89c22080e00c..167241c22e36 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 fdb37873525c..57a9135b3c71 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 67cf904850c6..0efcab4a9c90 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 9900a842be4f..d2d1e939d8cd 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 65bd23b77f51..6524937da4ee 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 8e5444ff3f9a..3e991a6ebab1 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 ac2ea82249d1..f1932c6d31b9 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 65c6e90d195a..aee7612c339f 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 585591bcb6bd..a74922d27932 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 ddeb32b868ce..79dda70912e2 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 8fc73e107745..be0c8b4b5903 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 d9520f58d12c..9736fea82d63 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 de169e18c599..58fc15347c98 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 d3a367f82551..01d026ef37ea 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 7343d843f2ee..b61c498ed14a 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/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_ConfluentOrganizationCollection.cs b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_ConfluentOrganizationCollection.cs index e3df67821395..2b06733ab4bb 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_ConfluentOrganizationCollection.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_ConfluentOrganizationCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ConfluentOrganizationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_OrganizationCreate() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Create.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_Create.json // this example is just showing the usage of "Organization_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -73,7 +73,7 @@ public async Task CreateOrUpdate_OrganizationCreate() [Ignore("Only validating compilation of examples")] public async Task Get_OrganizationGet() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Get.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_Get.json // this example is just showing the usage of "Organization_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 @@ -106,7 +106,7 @@ public async Task Get_OrganizationGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_OrganizationListByResourceGroup() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListByResourceGroup.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_ListByResourceGroup.json // this example is just showing the usage of "Organization_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 @@ -141,7 +141,7 @@ public async Task GetAll_OrganizationListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_OrganizationGet() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Get.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_Get.json // this example is just showing the usage of "Organization_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 @@ -170,7 +170,7 @@ public async Task Exists_OrganizationGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_OrganizationGet() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Get.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_Get.json // this example is just showing the usage of "Organization_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_ConfluentOrganizationResource.cs b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_ConfluentOrganizationResource.cs index 4f41145e8e49..28cb5b944194 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_ConfluentOrganizationResource.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_ConfluentOrganizationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ConfluentOrganizationResource [Ignore("Only validating compilation of examples")] public async Task Get_OrganizationGet() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Get.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_Get.json // this example is just showing the usage of "Organization_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_OrganizationGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ConfluentDelete() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Delete.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_Delete.json // this example is just showing the usage of "Organization_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -76,7 +76,7 @@ public async Task Delete_ConfluentDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ConfluentUpdate() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_Update.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_Update.json // this example is just showing the usage of "Organization_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 @@ -110,129 +110,11 @@ public async Task Update_ConfluentUpdate() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetEnvironments_OrganizationListEnvironments() - { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_EnvironmentList.json - // this example is just showing the usage of "Organization_ListEnvironments" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details 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 ConfluentOrganizationResource created on azure - // for more information of creating ConfluentOrganizationResource, please refer to the document of ConfluentOrganizationResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string organizationName = "myOrganization"; - ResourceIdentifier confluentOrganizationResourceId = ConfluentOrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); - ConfluentOrganizationResource confluentOrganization = client.GetConfluentOrganizationResource(confluentOrganizationResourceId); - - // invoke the operation and iterate over the result - int? pageSize = 10; - await foreach (SCEnvironmentRecord item in confluentOrganization.GetEnvironmentsAsync(pageSize: pageSize)) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetEnvironment_OrganizationGetEnvironmentById() - { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetEnvironmentById.json - // this example is just showing the usage of "Organization_GetEnvironmentById" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details 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 ConfluentOrganizationResource created on azure - // for more information of creating ConfluentOrganizationResource, please refer to the document of ConfluentOrganizationResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string organizationName = "myOrganization"; - ResourceIdentifier confluentOrganizationResourceId = ConfluentOrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); - ConfluentOrganizationResource confluentOrganization = client.GetConfluentOrganizationResource(confluentOrganizationResourceId); - - // invoke the operation - string environmentId = "dlz-f3a90de"; - SCEnvironmentRecord result = await confluentOrganization.GetEnvironmentAsync(environmentId); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetClusters_OrganizationListClusters() - { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ClusterList.json - // this example is just showing the usage of "Organization_ListClusters" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details 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 ConfluentOrganizationResource created on azure - // for more information of creating ConfluentOrganizationResource, please refer to the document of ConfluentOrganizationResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string organizationName = "myOrganization"; - ResourceIdentifier confluentOrganizationResourceId = ConfluentOrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); - ConfluentOrganizationResource confluentOrganization = client.GetConfluentOrganizationResource(confluentOrganizationResourceId); - - // invoke the operation and iterate over the result - string environmentId = "env-12132"; - int? pageSize = 10; - await foreach (SCClusterRecord item in confluentOrganization.GetClustersAsync(environmentId, pageSize: pageSize)) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetSchemaRegistryClusters_OrganizationListSchemaRegistryClusters() - { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListSchemaRegistryClusters.json - // this example is just showing the usage of "Organization_ListSchemaRegistryClusters" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details 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 ConfluentOrganizationResource created on azure - // for more information of creating ConfluentOrganizationResource, please refer to the document of ConfluentOrganizationResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string organizationName = "myOrganization"; - ResourceIdentifier confluentOrganizationResourceId = ConfluentOrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); - ConfluentOrganizationResource confluentOrganization = client.GetConfluentOrganizationResource(confluentOrganizationResourceId); - - // invoke the operation and iterate over the result - string environmentId = "env-stgcczjp2j3"; - await foreach (SchemaRegistryClusterRecord item in confluentOrganization.GetSchemaRegistryClustersAsync(environmentId)) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine("Succeeded"); - } - [Test] [Ignore("Only validating compilation of examples")] public async Task GetRegions_OrganizationListRegions() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListRegions.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_ListRegions.json // this example is just showing the usage of "Organization_ListRegions" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -263,44 +145,11 @@ public async Task GetRegions_OrganizationListRegions() Console.WriteLine($"Succeeded: {result}"); } - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateApiKey_OrganizationCreateAPIKey() - { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_CreateClusterAPIKey.json - // this example is just showing the usage of "Organization_CreateApiKey" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details 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 ConfluentOrganizationResource created on azure - // for more information of creating ConfluentOrganizationResource, please refer to the document of ConfluentOrganizationResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string organizationName = "myOrganization"; - ResourceIdentifier confluentOrganizationResourceId = ConfluentOrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); - ConfluentOrganizationResource confluentOrganization = client.GetConfluentOrganizationResource(confluentOrganizationResourceId); - - // invoke the operation - string environmentId = "env-12132"; - string clusterId = "clusterId-123"; - ConfluentApiKeyCreateContent content = new ConfluentApiKeyCreateContent - { - Name = "CI kafka access key", - Description = "This API key provides kafka access to cluster x", - }; - ConfluentApiKeyRecord result = await confluentOrganization.CreateApiKeyAsync(environmentId, clusterId, content); - - Console.WriteLine($"Succeeded: {result}"); - } - [Test] [Ignore("Only validating compilation of examples")] public async Task DeleteClusterApiKey_OrganizationDeleteClusterAPIKey() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_DeleteClusterAPIKey.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_DeleteClusterAPIKey.json // this example is just showing the usage of "Organization_DeleteClusterApiKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -327,7 +176,7 @@ public async Task DeleteClusterApiKey_OrganizationDeleteClusterAPIKey() [Ignore("Only validating compilation of examples")] public async Task GetClusterApiKey_OrganizationGetClusterAPIKey() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetClusterAPIKey.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_GetClusterAPIKey.json // this example is just showing the usage of "Organization_GetClusterApiKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -350,67 +199,11 @@ public async Task GetClusterApiKey_OrganizationGetClusterAPIKey() Console.WriteLine($"Succeeded: {result}"); } - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetSchemaRegistryCluster_OrganizationGetSchemaRegistryClusterById() - { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetSchemaRegistryClusterById.json - // this example is just showing the usage of "Organization_GetSchemaRegistryClusterById" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details 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 ConfluentOrganizationResource created on azure - // for more information of creating ConfluentOrganizationResource, please refer to the document of ConfluentOrganizationResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string organizationName = "myOrganization"; - ResourceIdentifier confluentOrganizationResourceId = ConfluentOrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); - ConfluentOrganizationResource confluentOrganization = client.GetConfluentOrganizationResource(confluentOrganizationResourceId); - - // invoke the operation - string environmentId = "env-stgcczjp2j3"; - string clusterId = "lsrc-stgczkq22z"; - SchemaRegistryClusterRecord result = await confluentOrganization.GetSchemaRegistryClusterAsync(environmentId, clusterId); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetCluster_OrganizationGetClusterById() - { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_GetClusterById.json - // this example is just showing the usage of "Organization_GetClusterById" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details 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 ConfluentOrganizationResource created on azure - // for more information of creating ConfluentOrganizationResource, please refer to the document of ConfluentOrganizationResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; - string organizationName = "myOrganization"; - ResourceIdentifier confluentOrganizationResourceId = ConfluentOrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); - ConfluentOrganizationResource confluentOrganization = client.GetConfluentOrganizationResource(confluentOrganizationResourceId); - - // invoke the operation - string environmentId = "env-12132"; - string clusterId = "dlz-f3a90de"; - SCClusterRecord result = await confluentOrganization.GetClusterAsync(environmentId, clusterId); - - Console.WriteLine($"Succeeded: {result}"); - } - [Test] [Ignore("Only validating compilation of examples")] public async Task GetAccessUsers_AccessUsersList() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_UsersList.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Access_UsersList.json // this example is just showing the usage of "Access_ListUsers" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -444,7 +237,7 @@ public async Task GetAccessUsers_AccessUsersList() [Ignore("Only validating compilation of examples")] public async Task GetAccessServiceAccounts_AccessServiceAccountsList() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_ServiceAccountsList.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Access_ServiceAccountsList.json // this example is just showing the usage of "Access_ListServiceAccounts" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -478,7 +271,7 @@ public async Task GetAccessServiceAccounts_AccessServiceAccountsList() [Ignore("Only validating compilation of examples")] public async Task GetAccessInvitations_AccessInvitationsList() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_InvitationsList.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Access_InvitationsList.json // this example is just showing the usage of "Access_ListInvitations" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -513,7 +306,7 @@ public async Task GetAccessInvitations_AccessInvitationsList() [Ignore("Only validating compilation of examples")] public async Task InviteUser_AccessInviteUser() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_InviteUser.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Access_InviteUser.json // this example is just showing the usage of "Access_InviteUser" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -547,7 +340,7 @@ public async Task InviteUser_AccessInviteUser() [Ignore("Only validating compilation of examples")] public async Task GetAccessEnvironments_AccessEnvironmentList() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_EnvironmentList.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Access_EnvironmentList.json // this example is just showing the usage of "Access_ListEnvironments" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -581,7 +374,7 @@ public async Task GetAccessEnvironments_AccessEnvironmentList() [Ignore("Only validating compilation of examples")] public async Task GetAccessClusters_AccessClusterList() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_ClusterList.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Access_ClusterList.json // this example is just showing the usage of "Access_ListClusters" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -615,7 +408,7 @@ public async Task GetAccessClusters_AccessClusterList() [Ignore("Only validating compilation of examples")] public async Task GetAccessRoleBindings_AccessRoleBindingList() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_RoleBindingList.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Access_RoleBindingList.json // this example is just showing the usage of "Access_ListRoleBindings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -649,7 +442,7 @@ public async Task GetAccessRoleBindings_AccessRoleBindingList() [Ignore("Only validating compilation of examples")] public async Task CreateAccessRoleBinding_AccessCreateRoleBinding() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_CreateRoleBinding.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Access_CreateRoleBinding.json // this example is just showing the usage of "Access_CreateRoleBinding" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -681,7 +474,7 @@ public async Task CreateAccessRoleBinding_AccessCreateRoleBinding() [Ignore("Only validating compilation of examples")] public async Task DeleteAccessRoleBinding_AccessDeleteRoleBinding() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_DeleteRoleBinding.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Access_DeleteRoleBinding.json // this example is just showing the usage of "Access_DeleteRoleBinding" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -708,7 +501,7 @@ public async Task DeleteAccessRoleBinding_AccessDeleteRoleBinding() [Ignore("Only validating compilation of examples")] public async Task GetAccessRoleBindingNames_AccessRoleBindingNameList() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Access_RoleBindingNameList.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Access_RoleBindingNameList.json // this example is just showing the usage of "Access_ListRoleBindingNameList" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_ConnectorResource.cs b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_ConnectorResource.cs new file mode 100644 index 000000000000..32c8b5b8c338 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_ConnectorResource.cs @@ -0,0 +1,143 @@ +// 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.Confluent.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Confluent.Samples +{ + public partial class Sample_ConnectorResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ConnectorGet() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_GetConnectorByName.json + // this example is just showing the usage of "Connector_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ConnectorResource created on azure + // for more information of creating ConnectorResource, please refer to the document of ConnectorResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + string clusterId = "dlz-f3a90de"; + string connectorName = "connector-1"; + ResourceIdentifier connectorResourceId = ConnectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, connectorName); + ConnectorResource connectorResource = client.GetConnectorResource(connectorResourceId); + + // invoke the operation + ConnectorResource result = await connectorResource.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 + ConnectorResourceData 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_ConnectorDelete() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_DeleteConnectorByName.json + // this example is just showing the usage of "Connector_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ConnectorResource created on azure + // for more information of creating ConnectorResource, please refer to the document of ConnectorResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + string clusterId = "dlz-f3a90de"; + string connectorName = "connector-1"; + ResourceIdentifier connectorResourceId = ConnectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, connectorName); + ConnectorResource connectorResource = client.GetConnectorResource(connectorResourceId); + + // invoke the operation + await connectorResource.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ConnectorCreateOrUpdate() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_CreateConnectorByName.json + // this example is just showing the usage of "Connector_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ConnectorResource created on azure + // for more information of creating ConnectorResource, please refer to the document of ConnectorResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + string clusterId = "dlz-f3a90de"; + string connectorName = "connector-1"; + ResourceIdentifier connectorResourceId = ConnectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, connectorName); + ConnectorResource connectorResource = client.GetConnectorResource(connectorResourceId); + + // invoke the operation + ConnectorResourceData data = new ConnectorResourceData + { + ConnectorBasicInfo = new ConnectorInfoBase + { + ConnectorType = ConnectorType.Sink, + ConnectorClass = new ConnectorClass("AZUREBLOBSTORAGESINK"), + ConnectorName = "connector-1", + }, + ConnectorServiceTypeInfo = new AzureBlobStorageSinkConnectorServiceInfo + { + StorageAccountName = "stcfaccount-1", + StorageAccountKey = "*******", + StorageContainerName = "continer-1", + }, + PartnerConnectorInfo = new KafkaAzureBlobStorageSinkConnectorInfo + { + AuthType = AuthType.KafkaApiKEY, + InputFormat = DataFormatType.Json, + OutputFormat = DataFormatType.Json, + ApiKey = "xxxxxxx", + ApiSecret = "*******", + Topics = { "topic-1" }, + TopicsDir = "topicsDir", + FlushSize = "1000", + MaxTasks = "2", + TimeInterval = "DAILY", + }, + }; + ArmOperation lro = await connectorResource.UpdateAsync(WaitUntil.Completed, data); + ConnectorResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectorResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_ConnectorResourceCollection.cs b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_ConnectorResourceCollection.cs new file mode 100644 index 000000000000..ee39d13840e3 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_ConnectorResourceCollection.cs @@ -0,0 +1,235 @@ +// 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.Confluent.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Confluent.Samples +{ + public partial class Sample_ConnectorResourceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ConnectorCreateOrUpdate() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_CreateConnectorByName.json + // this example is just showing the usage of "Connector_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SCClusterRecordResource created on azure + // for more information of creating SCClusterRecordResource, please refer to the document of SCClusterRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + string clusterId = "dlz-f3a90de"; + ResourceIdentifier scClusterRecordResourceId = SCClusterRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId); + SCClusterRecordResource scClusterRecord = client.GetSCClusterRecordResource(scClusterRecordResourceId); + + // get the collection of this ConnectorResource + ConnectorResourceCollection collection = scClusterRecord.GetConnectorResources(); + + // invoke the operation + string connectorName = "connector-1"; + ConnectorResourceData data = new ConnectorResourceData + { + ConnectorBasicInfo = new ConnectorInfoBase + { + ConnectorType = ConnectorType.Sink, + ConnectorClass = new ConnectorClass("AZUREBLOBSTORAGESINK"), + ConnectorName = "connector-1", + }, + ConnectorServiceTypeInfo = new AzureBlobStorageSinkConnectorServiceInfo + { + StorageAccountName = "stcfaccount-1", + StorageAccountKey = "*******", + StorageContainerName = "continer-1", + }, + PartnerConnectorInfo = new KafkaAzureBlobStorageSinkConnectorInfo + { + AuthType = AuthType.KafkaApiKEY, + InputFormat = DataFormatType.Json, + OutputFormat = DataFormatType.Json, + ApiKey = "xxxxxxx", + ApiSecret = "*******", + Topics = { "topic-1" }, + TopicsDir = "topicsDir", + FlushSize = "1000", + MaxTasks = "2", + TimeInterval = "DAILY", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, connectorName, data); + ConnectorResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectorResourceData 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_ConnectorGet() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_GetConnectorByName.json + // this example is just showing the usage of "Connector_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SCClusterRecordResource created on azure + // for more information of creating SCClusterRecordResource, please refer to the document of SCClusterRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + string clusterId = "dlz-f3a90de"; + ResourceIdentifier scClusterRecordResourceId = SCClusterRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId); + SCClusterRecordResource scClusterRecord = client.GetSCClusterRecordResource(scClusterRecordResourceId); + + // get the collection of this ConnectorResource + ConnectorResourceCollection collection = scClusterRecord.GetConnectorResources(); + + // invoke the operation + string connectorName = "connector-1"; + ConnectorResource result = await collection.GetAsync(connectorName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectorResourceData 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_ConnectorList() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_ConnectorList.json + // this example is just showing the usage of "Connector_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SCClusterRecordResource created on azure + // for more information of creating SCClusterRecordResource, please refer to the document of SCClusterRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + string clusterId = "dlz-f3a90de"; + ResourceIdentifier scClusterRecordResourceId = SCClusterRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId); + SCClusterRecordResource scClusterRecord = client.GetSCClusterRecordResource(scClusterRecordResourceId); + + // get the collection of this ConnectorResource + ConnectorResourceCollection collection = scClusterRecord.GetConnectorResources(); + + // invoke the operation and iterate over the result + int? pageSize = 10; + await foreach (ConnectorResource item in collection.GetAllAsync(pageSize: pageSize)) + { + // 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 + ConnectorResourceData 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_ConnectorGet() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_GetConnectorByName.json + // this example is just showing the usage of "Connector_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SCClusterRecordResource created on azure + // for more information of creating SCClusterRecordResource, please refer to the document of SCClusterRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + string clusterId = "dlz-f3a90de"; + ResourceIdentifier scClusterRecordResourceId = SCClusterRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId); + SCClusterRecordResource scClusterRecord = client.GetSCClusterRecordResource(scClusterRecordResourceId); + + // get the collection of this ConnectorResource + ConnectorResourceCollection collection = scClusterRecord.GetConnectorResources(); + + // invoke the operation + string connectorName = "connector-1"; + bool result = await collection.ExistsAsync(connectorName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ConnectorGet() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_GetConnectorByName.json + // this example is just showing the usage of "Connector_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SCClusterRecordResource created on azure + // for more information of creating SCClusterRecordResource, please refer to the document of SCClusterRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + string clusterId = "dlz-f3a90de"; + ResourceIdentifier scClusterRecordResourceId = SCClusterRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId); + SCClusterRecordResource scClusterRecord = client.GetSCClusterRecordResource(scClusterRecordResourceId); + + // get the collection of this ConnectorResource + ConnectorResourceCollection collection = scClusterRecord.GetConnectorResources(); + + // invoke the operation + string connectorName = "connector-1"; + NullableResponse response = await collection.GetIfExistsAsync(connectorName); + ConnectorResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ConnectorResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs index b6c14aed8114..b034337b0aec 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_ResourceGroupResourceExtensions [Ignore("Only validating compilation of examples")] public async Task ValidateOrganization_ValidationsValidateOrganizations() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Validations_ValidateOrganizations.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Validations_ValidateOrganizations.json // this example is just showing the usage of "Validations_ValidateOrganization" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -68,7 +68,7 @@ public async Task ValidateOrganization_ValidationsValidateOrganizations() [Ignore("Only validating compilation of examples")] public async Task ValidateOrganizationV2_ValidationsValidateOrganizations() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Validations_ValidateOrganizationsV2.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Validations_ValidateOrganizationsV2.json // this example is just showing the usage of "Validations_ValidateOrganizationV2" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_SCClusterRecordCollection.cs b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_SCClusterRecordCollection.cs new file mode 100644 index 000000000000..30c150848a32 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_SCClusterRecordCollection.cs @@ -0,0 +1,214 @@ +// 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.Confluent.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Confluent.Samples +{ + public partial class Sample_SCClusterRecordCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ClusterCreateOrUpdate() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Cluster_Create.json + // this example is just showing the usage of "Cluster_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 SCEnvironmentRecordResource created on azure + // for more information of creating SCEnvironmentRecordResource, please refer to the document of SCEnvironmentRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-1"; + ResourceIdentifier scEnvironmentRecordResourceId = SCEnvironmentRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId); + SCEnvironmentRecordResource scEnvironmentRecord = client.GetSCEnvironmentRecordResource(scEnvironmentRecordResourceId); + + // get the collection of this SCClusterRecordResource + SCClusterRecordCollection collection = scEnvironmentRecord.GetSCClusterRecords(); + + // invoke the operation + string clusterId = "cluster-1"; + SCClusterRecordData data = new SCClusterRecordData + { + Spec = new SCClusterSpecEntity + { + Package = Package.Essentials, + Region = "us-east4", + Environment = new SCClusterNetworkEnvironmentEntity + { + Id = "env-1", + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, clusterId, data); + SCClusterRecordResource 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 + SCClusterRecordData 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_OrganizationGetClusterById() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_GetClusterById.json + // this example is just showing the usage of "Organization_GetClusterById" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 SCEnvironmentRecordResource created on azure + // for more information of creating SCEnvironmentRecordResource, please refer to the document of SCEnvironmentRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + ResourceIdentifier scEnvironmentRecordResourceId = SCEnvironmentRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId); + SCEnvironmentRecordResource scEnvironmentRecord = client.GetSCEnvironmentRecordResource(scEnvironmentRecordResourceId); + + // get the collection of this SCClusterRecordResource + SCClusterRecordCollection collection = scEnvironmentRecord.GetSCClusterRecords(); + + // invoke the operation + string clusterId = "dlz-f3a90de"; + SCClusterRecordResource result = await collection.GetAsync(clusterId); + + // 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 + SCClusterRecordData 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_OrganizationListClusters() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_ClusterList.json + // this example is just showing the usage of "Organization_ListClusters" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 SCEnvironmentRecordResource created on azure + // for more information of creating SCEnvironmentRecordResource, please refer to the document of SCEnvironmentRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + ResourceIdentifier scEnvironmentRecordResourceId = SCEnvironmentRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId); + SCEnvironmentRecordResource scEnvironmentRecord = client.GetSCEnvironmentRecordResource(scEnvironmentRecordResourceId); + + // get the collection of this SCClusterRecordResource + SCClusterRecordCollection collection = scEnvironmentRecord.GetSCClusterRecords(); + + // invoke the operation and iterate over the result + int? pageSize = 10; + await foreach (SCClusterRecordResource item in collection.GetAllAsync(pageSize: pageSize)) + { + // 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 + SCClusterRecordData 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_OrganizationGetClusterById() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_GetClusterById.json + // this example is just showing the usage of "Organization_GetClusterById" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 SCEnvironmentRecordResource created on azure + // for more information of creating SCEnvironmentRecordResource, please refer to the document of SCEnvironmentRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + ResourceIdentifier scEnvironmentRecordResourceId = SCEnvironmentRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId); + SCEnvironmentRecordResource scEnvironmentRecord = client.GetSCEnvironmentRecordResource(scEnvironmentRecordResourceId); + + // get the collection of this SCClusterRecordResource + SCClusterRecordCollection collection = scEnvironmentRecord.GetSCClusterRecords(); + + // invoke the operation + string clusterId = "dlz-f3a90de"; + bool result = await collection.ExistsAsync(clusterId); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_OrganizationGetClusterById() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_GetClusterById.json + // this example is just showing the usage of "Organization_GetClusterById" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 SCEnvironmentRecordResource created on azure + // for more information of creating SCEnvironmentRecordResource, please refer to the document of SCEnvironmentRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + ResourceIdentifier scEnvironmentRecordResourceId = SCEnvironmentRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId); + SCEnvironmentRecordResource scEnvironmentRecord = client.GetSCEnvironmentRecordResource(scEnvironmentRecordResourceId); + + // get the collection of this SCClusterRecordResource + SCClusterRecordCollection collection = scEnvironmentRecord.GetSCClusterRecords(); + + // invoke the operation + string clusterId = "dlz-f3a90de"; + NullableResponse response = await collection.GetIfExistsAsync(clusterId); + SCClusterRecordResource 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 + SCClusterRecordData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_SCClusterRecordResource.cs b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_SCClusterRecordResource.cs new file mode 100644 index 000000000000..3538ff0756f9 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_SCClusterRecordResource.cs @@ -0,0 +1,157 @@ +// 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.Confluent.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Confluent.Samples +{ + public partial class Sample_SCClusterRecordResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_OrganizationGetClusterById() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_GetClusterById.json + // this example is just showing the usage of "Organization_GetClusterById" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 SCClusterRecordResource created on azure + // for more information of creating SCClusterRecordResource, please refer to the document of SCClusterRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + string clusterId = "dlz-f3a90de"; + ResourceIdentifier scClusterRecordResourceId = SCClusterRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId); + SCClusterRecordResource scClusterRecord = client.GetSCClusterRecordResource(scClusterRecordResourceId); + + // invoke the operation + SCClusterRecordResource result = await scClusterRecord.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 + SCClusterRecordData 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_ClusterDelete() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Cluster_Delete.json + // this example is just showing the usage of "Cluster_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 SCClusterRecordResource created on azure + // for more information of creating SCClusterRecordResource, please refer to the document of SCClusterRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + string clusterId = "dlz-f3a90de"; + ResourceIdentifier scClusterRecordResourceId = SCClusterRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId); + SCClusterRecordResource scClusterRecord = client.GetSCClusterRecordResource(scClusterRecordResourceId); + + // invoke the operation + await scClusterRecord.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ClusterCreateOrUpdate() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Cluster_Create.json + // this example is just showing the usage of "Cluster_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 SCClusterRecordResource created on azure + // for more information of creating SCClusterRecordResource, please refer to the document of SCClusterRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-1"; + string clusterId = "cluster-1"; + ResourceIdentifier scClusterRecordResourceId = SCClusterRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId); + SCClusterRecordResource scClusterRecord = client.GetSCClusterRecordResource(scClusterRecordResourceId); + + // invoke the operation + SCClusterRecordData data = new SCClusterRecordData + { + Spec = new SCClusterSpecEntity + { + Package = Package.Essentials, + Region = "us-east4", + Environment = new SCClusterNetworkEnvironmentEntity + { + Id = "env-1", + }, + }, + }; + ArmOperation lro = await scClusterRecord.UpdateAsync(WaitUntil.Completed, data); + SCClusterRecordResource 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 + SCClusterRecordData 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 CreateApiKey_OrganizationCreateClusterAPIKey() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_CreateClusterAPIKey.json + // this example is just showing the usage of "Organization_CreateApiKey" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 SCClusterRecordResource created on azure + // for more information of creating SCClusterRecordResource, please refer to the document of SCClusterRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + string clusterId = "clusterId-123"; + ResourceIdentifier scClusterRecordResourceId = SCClusterRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId); + SCClusterRecordResource scClusterRecord = client.GetSCClusterRecordResource(scClusterRecordResourceId); + + // invoke the operation + ConfluentApiKeyCreateContent content = new ConfluentApiKeyCreateContent + { + Name = "CI kafka access key", + Description = "This API key provides kafka access to cluster x", + }; + ConfluentApiKeyRecord result = await scClusterRecord.CreateApiKeyAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_SCEnvironmentRecordCollection.cs b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_SCEnvironmentRecordCollection.cs new file mode 100644 index 000000000000..8bf0a4015935 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_SCEnvironmentRecordCollection.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Confluent.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Confluent.Samples +{ + public partial class Sample_SCEnvironmentRecordCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_EnvironmentCreateOrUpdate() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Environment_Create.json + // this example is just showing the usage of "Environment_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 ConfluentOrganizationResource created on azure + // for more information of creating ConfluentOrganizationResource, please refer to the document of ConfluentOrganizationResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + ResourceIdentifier confluentOrganizationResourceId = ConfluentOrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); + ConfluentOrganizationResource confluentOrganization = client.GetConfluentOrganizationResource(confluentOrganizationResourceId); + + // get the collection of this SCEnvironmentRecordResource + SCEnvironmentRecordCollection collection = confluentOrganization.GetSCEnvironmentRecords(); + + // invoke the operation + string environmentId = "env-1"; + SCEnvironmentRecordData data = new SCEnvironmentRecordData + { + StreamGovernanceConfigPackage = Package.Essentials, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, environmentId, data); + SCEnvironmentRecordResource 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 + SCEnvironmentRecordData 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_OrganizationGetEnvironmentById() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_GetEnvironmentById.json + // this example is just showing the usage of "Organization_GetEnvironmentById" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 ConfluentOrganizationResource created on azure + // for more information of creating ConfluentOrganizationResource, please refer to the document of ConfluentOrganizationResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + ResourceIdentifier confluentOrganizationResourceId = ConfluentOrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); + ConfluentOrganizationResource confluentOrganization = client.GetConfluentOrganizationResource(confluentOrganizationResourceId); + + // get the collection of this SCEnvironmentRecordResource + SCEnvironmentRecordCollection collection = confluentOrganization.GetSCEnvironmentRecords(); + + // invoke the operation + string environmentId = "dlz-f3a90de"; + SCEnvironmentRecordResource result = await collection.GetAsync(environmentId); + + // 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 + SCEnvironmentRecordData 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_OrganizationListEnvironments() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_EnvironmentList.json + // this example is just showing the usage of "Organization_ListEnvironments" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 ConfluentOrganizationResource created on azure + // for more information of creating ConfluentOrganizationResource, please refer to the document of ConfluentOrganizationResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + ResourceIdentifier confluentOrganizationResourceId = ConfluentOrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); + ConfluentOrganizationResource confluentOrganization = client.GetConfluentOrganizationResource(confluentOrganizationResourceId); + + // get the collection of this SCEnvironmentRecordResource + SCEnvironmentRecordCollection collection = confluentOrganization.GetSCEnvironmentRecords(); + + // invoke the operation and iterate over the result + int? pageSize = 10; + await foreach (SCEnvironmentRecordResource item in collection.GetAllAsync(pageSize: pageSize)) + { + // 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 + SCEnvironmentRecordData 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_OrganizationGetEnvironmentById() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_GetEnvironmentById.json + // this example is just showing the usage of "Organization_GetEnvironmentById" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 ConfluentOrganizationResource created on azure + // for more information of creating ConfluentOrganizationResource, please refer to the document of ConfluentOrganizationResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + ResourceIdentifier confluentOrganizationResourceId = ConfluentOrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); + ConfluentOrganizationResource confluentOrganization = client.GetConfluentOrganizationResource(confluentOrganizationResourceId); + + // get the collection of this SCEnvironmentRecordResource + SCEnvironmentRecordCollection collection = confluentOrganization.GetSCEnvironmentRecords(); + + // invoke the operation + string environmentId = "dlz-f3a90de"; + bool result = await collection.ExistsAsync(environmentId); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_OrganizationGetEnvironmentById() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_GetEnvironmentById.json + // this example is just showing the usage of "Organization_GetEnvironmentById" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 ConfluentOrganizationResource created on azure + // for more information of creating ConfluentOrganizationResource, please refer to the document of ConfluentOrganizationResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + ResourceIdentifier confluentOrganizationResourceId = ConfluentOrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); + ConfluentOrganizationResource confluentOrganization = client.GetConfluentOrganizationResource(confluentOrganizationResourceId); + + // get the collection of this SCEnvironmentRecordResource + SCEnvironmentRecordCollection collection = confluentOrganization.GetSCEnvironmentRecords(); + + // invoke the operation + string environmentId = "dlz-f3a90de"; + NullableResponse response = await collection.GetIfExistsAsync(environmentId); + SCEnvironmentRecordResource 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 + SCEnvironmentRecordData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_SCEnvironmentRecordResource.cs b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_SCEnvironmentRecordResource.cs new file mode 100644 index 000000000000..2f89ed763b3f --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_SCEnvironmentRecordResource.cs @@ -0,0 +1,171 @@ +// 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.Confluent.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Confluent.Samples +{ + public partial class Sample_SCEnvironmentRecordResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_OrganizationGetEnvironmentById() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_GetEnvironmentById.json + // this example is just showing the usage of "Organization_GetEnvironmentById" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 SCEnvironmentRecordResource created on azure + // for more information of creating SCEnvironmentRecordResource, please refer to the document of SCEnvironmentRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "dlz-f3a90de"; + ResourceIdentifier scEnvironmentRecordResourceId = SCEnvironmentRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId); + SCEnvironmentRecordResource scEnvironmentRecord = client.GetSCEnvironmentRecordResource(scEnvironmentRecordResourceId); + + // invoke the operation + SCEnvironmentRecordResource result = await scEnvironmentRecord.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 + SCEnvironmentRecordData 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_EnvironmentDelete() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Environment_Delete.json + // this example is just showing the usage of "Environment_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 SCEnvironmentRecordResource created on azure + // for more information of creating SCEnvironmentRecordResource, please refer to the document of SCEnvironmentRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + ResourceIdentifier scEnvironmentRecordResourceId = SCEnvironmentRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId); + SCEnvironmentRecordResource scEnvironmentRecord = client.GetSCEnvironmentRecordResource(scEnvironmentRecordResourceId); + + // invoke the operation + await scEnvironmentRecord.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_EnvironmentCreateOrUpdate() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Environment_Create.json + // this example is just showing the usage of "Environment_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 SCEnvironmentRecordResource created on azure + // for more information of creating SCEnvironmentRecordResource, please refer to the document of SCEnvironmentRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-1"; + ResourceIdentifier scEnvironmentRecordResourceId = SCEnvironmentRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId); + SCEnvironmentRecordResource scEnvironmentRecord = client.GetSCEnvironmentRecordResource(scEnvironmentRecordResourceId); + + // invoke the operation + SCEnvironmentRecordData data = new SCEnvironmentRecordData + { + StreamGovernanceConfigPackage = Package.Essentials, + }; + ArmOperation lro = await scEnvironmentRecord.UpdateAsync(WaitUntil.Completed, data); + SCEnvironmentRecordResource 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 + SCEnvironmentRecordData 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 GetSchemaRegistryClusters_OrganizationListSchemaRegistryClusters() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_ListSchemaRegistryClusters.json + // this example is just showing the usage of "Organization_ListSchemaRegistryClusters" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 SCEnvironmentRecordResource created on azure + // for more information of creating SCEnvironmentRecordResource, please refer to the document of SCEnvironmentRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-stgcczjp2j3"; + ResourceIdentifier scEnvironmentRecordResourceId = SCEnvironmentRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId); + SCEnvironmentRecordResource scEnvironmentRecord = client.GetSCEnvironmentRecordResource(scEnvironmentRecordResourceId); + + // invoke the operation and iterate over the result + await foreach (SchemaRegistryClusterRecord item in scEnvironmentRecord.GetSchemaRegistryClustersAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetSchemaRegistryCluster_OrganizationGetSchemaRegistryClusterById() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_GetSchemaRegistryClusterById.json + // this example is just showing the usage of "Organization_GetSchemaRegistryClusterById" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details 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 SCEnvironmentRecordResource created on azure + // for more information of creating SCEnvironmentRecordResource, please refer to the document of SCEnvironmentRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-stgcczjp2j3"; + ResourceIdentifier scEnvironmentRecordResourceId = SCEnvironmentRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId); + SCEnvironmentRecordResource scEnvironmentRecord = client.GetSCEnvironmentRecordResource(scEnvironmentRecordResourceId); + + // invoke the operation + string clusterId = "lsrc-stgczkq22z"; + SchemaRegistryClusterRecord result = await scEnvironmentRecord.GetSchemaRegistryClusterAsync(clusterId); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 6e96d95d8672..3f6edc8fbfa7 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetMarketplaceAgreements_MarketplaceAgreementsList() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/MarketplaceAgreements_List.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/MarketplaceAgreements_List.json // this example is just showing the usage of "MarketplaceAgreements_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task GetMarketplaceAgreements_MarketplaceAgreementsList() [Ignore("Only validating compilation of examples")] public async Task CreateMarketplaceAgreement_MarketplaceAgreementsCreate() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/MarketplaceAgreements_Create.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/MarketplaceAgreements_Create.json // this example is just showing the usage of "MarketplaceAgreements_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -72,7 +72,7 @@ public async Task CreateMarketplaceAgreement_MarketplaceAgreementsCreate() [Ignore("Only validating compilation of examples")] public async Task GetConfluentOrganizations_OrganizationListBySubscription() { - // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-02-13/examples/Organization_ListBySubscription.json + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_ListBySubscription.json // this example is just showing the usage of "Organization_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 diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_TopicRecordCollection.cs b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_TopicRecordCollection.cs new file mode 100644 index 000000000000..57aa3bc75006 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_TopicRecordCollection.cs @@ -0,0 +1,221 @@ +// 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.Confluent.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Confluent.Samples +{ + public partial class Sample_TopicRecordCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_TopicsCreate() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Topics_Create.json + // this example is just showing the usage of "Topics_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SCClusterRecordResource created on azure + // for more information of creating SCClusterRecordResource, please refer to the document of SCClusterRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + string clusterId = "dlz-f3a90de"; + ResourceIdentifier scClusterRecordResourceId = SCClusterRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId); + SCClusterRecordResource scClusterRecord = client.GetSCClusterRecordResource(scClusterRecordResourceId); + + // get the collection of this TopicRecordResource + TopicRecordCollection collection = scClusterRecord.GetTopicRecords(); + + // invoke the operation + string topicName = "topic-1"; + TopicRecordData data = new TopicRecordData + { + InputConfigs = {new TopicsInputConfig +{ +Name = "cleanup.policy", +Value = "compact", +}, new TopicsInputConfig +{ +Name = "retention.ms", +Value = "86400000", +}}, + PartitionsCount = "1", + ReplicationFactor = "3", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, topicName, data); + TopicRecordResource 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 + TopicRecordData 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_TopicsGet() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Topics_Get.json + // this example is just showing the usage of "Topics_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 SCClusterRecordResource created on azure + // for more information of creating SCClusterRecordResource, please refer to the document of SCClusterRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + string clusterId = "dlz-f3a90de"; + ResourceIdentifier scClusterRecordResourceId = SCClusterRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId); + SCClusterRecordResource scClusterRecord = client.GetSCClusterRecordResource(scClusterRecordResourceId); + + // get the collection of this TopicRecordResource + TopicRecordCollection collection = scClusterRecord.GetTopicRecords(); + + // invoke the operation + string topicName = "topic-1"; + TopicRecordResource result = await collection.GetAsync(topicName); + + // 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 + TopicRecordData 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_OrganizationListTopics() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Organization_TopicList.json + // this example is just showing the usage of "Topics_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SCClusterRecordResource created on azure + // for more information of creating SCClusterRecordResource, please refer to the document of SCClusterRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + string clusterId = "dlz-f3a90de"; + ResourceIdentifier scClusterRecordResourceId = SCClusterRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId); + SCClusterRecordResource scClusterRecord = client.GetSCClusterRecordResource(scClusterRecordResourceId); + + // get the collection of this TopicRecordResource + TopicRecordCollection collection = scClusterRecord.GetTopicRecords(); + + // invoke the operation and iterate over the result + int? pageSize = 10; + await foreach (TopicRecordResource item in collection.GetAllAsync(pageSize: pageSize)) + { + // 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 + TopicRecordData 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_TopicsGet() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Topics_Get.json + // this example is just showing the usage of "Topics_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 SCClusterRecordResource created on azure + // for more information of creating SCClusterRecordResource, please refer to the document of SCClusterRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + string clusterId = "dlz-f3a90de"; + ResourceIdentifier scClusterRecordResourceId = SCClusterRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId); + SCClusterRecordResource scClusterRecord = client.GetSCClusterRecordResource(scClusterRecordResourceId); + + // get the collection of this TopicRecordResource + TopicRecordCollection collection = scClusterRecord.GetTopicRecords(); + + // invoke the operation + string topicName = "topic-1"; + bool result = await collection.ExistsAsync(topicName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_TopicsGet() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Topics_Get.json + // this example is just showing the usage of "Topics_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 SCClusterRecordResource created on azure + // for more information of creating SCClusterRecordResource, please refer to the document of SCClusterRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + string clusterId = "dlz-f3a90de"; + ResourceIdentifier scClusterRecordResourceId = SCClusterRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId); + SCClusterRecordResource scClusterRecord = client.GetSCClusterRecordResource(scClusterRecordResourceId); + + // get the collection of this TopicRecordResource + TopicRecordCollection collection = scClusterRecord.GetTopicRecords(); + + // invoke the operation + string topicName = "topic-1"; + NullableResponse response = await collection.GetIfExistsAsync(topicName); + TopicRecordResource 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 + TopicRecordData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_TopicRecordResource.cs b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_TopicRecordResource.cs new file mode 100644 index 000000000000..4cde2c85be58 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/samples/Generated/Samples/Sample_TopicRecordResource.cs @@ -0,0 +1,129 @@ +// 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.Confluent.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Confluent.Samples +{ + public partial class Sample_TopicRecordResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_TopicsGet() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Topics_Get.json + // this example is just showing the usage of "Topics_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 TopicRecordResource created on azure + // for more information of creating TopicRecordResource, please refer to the document of TopicRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + string clusterId = "dlz-f3a90de"; + string topicName = "topic-1"; + ResourceIdentifier topicRecordResourceId = TopicRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, topicName); + TopicRecordResource topicRecord = client.GetTopicRecordResource(topicRecordResourceId); + + // invoke the operation + TopicRecordResource result = await topicRecord.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 + TopicRecordData 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_TopicsDelete() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Topics_Delete.json + // this example is just showing the usage of "Topics_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 TopicRecordResource created on azure + // for more information of creating TopicRecordResource, please refer to the document of TopicRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + string clusterId = "dlz-f3a90de"; + string topicName = "topic-1"; + ResourceIdentifier topicRecordResourceId = TopicRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, topicName); + TopicRecordResource topicRecord = client.GetTopicRecordResource(topicRecordResourceId); + + // invoke the operation + await topicRecord.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_TopicsCreate() + { + // Generated from example definition: specification/confluent/resource-manager/Microsoft.Confluent/stable/2024-07-01/examples/Topics_Create.json + // this example is just showing the usage of "Topics_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TopicRecordResource created on azure + // for more information of creating TopicRecordResource, please refer to the document of TopicRecordResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string organizationName = "myOrganization"; + string environmentId = "env-12132"; + string clusterId = "dlz-f3a90de"; + string topicName = "topic-1"; + ResourceIdentifier topicRecordResourceId = TopicRecordResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, topicName); + TopicRecordResource topicRecord = client.GetTopicRecordResource(topicRecordResourceId); + + // invoke the operation + TopicRecordData data = new TopicRecordData + { + InputConfigs = {new TopicsInputConfig +{ +Name = "cleanup.policy", +Value = "compact", +}, new TopicsInputConfig +{ +Name = "retention.ms", +Value = "86400000", +}}, + PartitionsCount = "1", + ReplicationFactor = "3", + }; + ArmOperation lro = await topicRecord.UpdateAsync(WaitUntil.Completed, data); + TopicRecordResource 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 + TopicRecordData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ArmConfluentModelFactory.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ArmConfluentModelFactory.cs index c7508a5eb465..939f3fc70632 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ArmConfluentModelFactory.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ArmConfluentModelFactory.cs @@ -348,15 +348,6 @@ public static ClusterByokEntity ClusterByokEntity(string id = null, string relat return new ClusterByokEntity(id, related, resourceName, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The lifecycle phase of the cluster. - /// The number of Confluent Kafka Units. - /// A new instance for mocking. - public static ClusterStatusEntity ClusterStatusEntity(string phase = null, int? cku = null) - { - return new ClusterStatusEntity(phase, cku, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// Type of response. /// Metadata of the list. @@ -401,108 +392,6 @@ public static AccessRoleBindingNameListResult AccessRoleBindingNameListResult(st return new AccessRoleBindingNameListResult(kind, metadata, data?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Type of environment. - /// Id of the environment. - /// Display name of the environment. - /// Metadata of the record. - /// A new instance for mocking. - public static SCEnvironmentRecord SCEnvironmentRecord(string kind = null, string id = null, string name = null, SCMetadataEntity metadata = null) - { - return new SCEnvironmentRecord(kind, id, name, metadata, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Self lookup url. - /// Resource name of the record. - /// Created Date Time. - /// Updated Date time. - /// Deleted Date time. - /// A new instance for mocking. - public static SCMetadataEntity SCMetadataEntity(string self = null, string resourceName = null, DateTimeOffset? createdOn = null, DateTimeOffset? updatedOn = null, DateTimeOffset? deletedOn = null) - { - return new SCMetadataEntity( - self, - resourceName, - createdOn, - updatedOn, - deletedOn, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Type of cluster. - /// Id of the cluster. - /// Display name of the cluster. - /// Metadata of the record. - /// Specification of the cluster. - /// Specification of the cluster status. - /// A new instance for mocking. - public static SCClusterRecord SCClusterRecord(string kind = null, string id = null, string name = null, SCMetadataEntity metadata = null, SCClusterSpecEntity spec = null, ClusterStatusEntity status = null) - { - return new SCClusterRecord( - kind, - id, - name, - metadata, - spec, - status, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The name of the cluster. - /// The availability zone configuration of the cluster. - /// The cloud service provider. - /// type of zone availability. - /// The cloud service provider region. - /// The bootstrap endpoint used by Kafka clients to connect to the cluster. - /// The cluster HTTP request URL. - /// The Kafka API cluster endpoint. - /// Specification of the cluster configuration. - /// Specification of the cluster environment. - /// Specification of the cluster network. - /// Specification of the cluster byok. - /// A new instance for mocking. - public static SCClusterSpecEntity SCClusterSpecEntity(string name = null, string availability = null, string cloud = null, string zone = null, string region = null, string kafkaBootstrapEndpoint = null, string httpEndpoint = null, string apiEndpoint = null, string configKind = null, SCClusterNetworkEnvironmentEntity environment = null, SCClusterNetworkEnvironmentEntity network = null, SCClusterByokEntity byok = null) - { - return new SCClusterSpecEntity( - name, - availability, - cloud, - zone, - region, - kafkaBootstrapEndpoint, - httpEndpoint, - apiEndpoint, - configKind != null ? new ClusterConfigEntity(configKind, serializedAdditionalRawData: null) : null, - environment, - network, - byok, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// ID of the referred resource. - /// Environment of the referred resource. - /// API URL for accessing or modifying the referred object. - /// CRN reference to the referred resource. - /// A new instance for mocking. - public static SCClusterNetworkEnvironmentEntity SCClusterNetworkEnvironmentEntity(string id = null, string environment = null, string related = null, string resourceName = null) - { - return new SCClusterNetworkEnvironmentEntity(id, environment, related, resourceName, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// ID of the referred resource. - /// API URL for accessing or modifying the referred object. - /// CRN reference to the referred resource. - /// A new instance for mocking. - public static SCClusterByokEntity SCClusterByokEntity(string id = null, string related = null, string resourceName = null) - { - return new SCClusterByokEntity(id, related, resourceName, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// Kind of the cluster. /// Id of the cluster. @@ -643,6 +532,72 @@ public static ApiKeyOwnerEntity ApiKeyOwnerEntity(string id = null, string relat return new ApiKeyOwnerEntity(id, related, resourceName, kind, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Connector Info Base. + /// + /// Connector Service type info base properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + /// + /// The connection information consumed by applications. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + /// A new instance for mocking. + public static ConnectorResourceData ConnectorResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ConnectorInfoBase connectorBasicInfo = null, ConnectorServiceTypeInfoBase connectorServiceTypeInfo = null, PartnerInfoBase partnerConnectorInfo = null) + { + return new ConnectorResourceData( + id, + name, + resourceType, + systemData, + connectorBasicInfo, + connectorServiceTypeInfo, + partnerConnectorInfo, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Type of topic. + /// Topic Id returned by Confluent. + /// Metadata of the record. + /// Partition Specification of the topic. + /// Config Specification of the topic. + /// Input Config Specification of the topic. + /// Partition Reassignment Specification of the topic. + /// Partition count of the topic. + /// Replication factor of the topic. + /// A new instance for mocking. + public static TopicRecordData TopicRecordData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string kind = null, string topicId = null, TopicMetadataEntity metadata = null, string partitionsRelated = null, string configsRelated = null, IEnumerable inputConfigs = null, string partitionsReassignmentsRelated = null, string partitionsCount = null, string replicationFactor = null) + { + inputConfigs ??= new List(); + + return new TopicRecordData( + id, + name, + resourceType, + systemData, + kind, + topicId, + metadata, + partitionsRelated != null ? new TopicsRelatedLink(partitionsRelated, serializedAdditionalRawData: null) : null, + configsRelated != null ? new TopicsRelatedLink(configsRelated, serializedAdditionalRawData: null) : null, + inputConfigs?.ToList(), + partitionsReassignmentsRelated != null ? new TopicsRelatedLink(partitionsReassignmentsRelated, serializedAdditionalRawData: null) : null, + partitionsCount, + replicationFactor, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of ConfluentOrganizationData. /// The id. /// The name. diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConfluentOrganizationCollection.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConfluentOrganizationCollection.cs index bf4e0e7ba54e..5a1df1a95baa 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConfluentOrganizationCollection.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConfluentOrganizationCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string organizationNa /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string organizationName, C /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string organizationName, CancellationToken /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConfluentOrganizationResource.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConfluentOrganizationResource.cs index d6f533c7cfcd..dc61f54037b2 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConfluentOrganizationResource.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConfluentOrganizationResource.cs @@ -10,7 +10,6 @@ using System.Globalization; using System.Threading; using System.Threading.Tasks; -using Autorest.CSharp.Core; using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager.Confluent.Models; @@ -95,6 +94,75 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } + /// Gets a collection of SCEnvironmentRecordResources in the ConfluentOrganization. + /// An object representing collection of SCEnvironmentRecordResources and their operations over a SCEnvironmentRecordResource. + public virtual SCEnvironmentRecordCollection GetSCEnvironmentRecords() + { + return GetCachedClient(client => new SCEnvironmentRecordCollection(client, Id)); + } + + /// + /// Get Environment details by environment Id + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId} + /// + /// + /// Operation Id + /// Organization_GetEnvironmentById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent environment id. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSCEnvironmentRecordAsync(string environmentId, CancellationToken cancellationToken = default) + { + return await GetSCEnvironmentRecords().GetAsync(environmentId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get Environment details by environment Id + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId} + /// + /// + /// Operation Id + /// Organization_GetEnvironmentById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent environment id. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSCEnvironmentRecord(string environmentId, CancellationToken cancellationToken = default) + { + return GetSCEnvironmentRecords().Get(environmentId, cancellationToken); + } + /// /// Get the properties of a specific Organization resource. /// @@ -108,7 +176,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -148,7 +216,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -188,7 +256,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -230,7 +298,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -272,7 +340,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -314,7 +382,7 @@ public virtual async Task> UpdateAsync(C /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -343,304 +411,6 @@ public virtual Response Update(ConfluentOrganizat } } - /// - /// Lists of all the environments in a organization - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments - /// - /// - /// Operation Id - /// Organization_ListEnvironments - /// - /// - /// Default Api Version - /// 2024-02-13 - /// - /// - /// Resource - /// - /// - /// - /// - /// Pagination size. - /// An opaque pagination token to fetch the next set of records. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetEnvironmentsAsync(int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _confluentOrganizationOrganizationRestClient.CreateListEnvironmentsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint, pageToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _confluentOrganizationOrganizationRestClient.CreateListEnvironmentsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint, pageToken); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => SCEnvironmentRecord.DeserializeSCEnvironmentRecord(e), _confluentOrganizationOrganizationClientDiagnostics, Pipeline, "ConfluentOrganizationResource.GetEnvironments", "value", "nextLink", cancellationToken); - } - - /// - /// Lists of all the environments in a organization - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments - /// - /// - /// Operation Id - /// Organization_ListEnvironments - /// - /// - /// Default Api Version - /// 2024-02-13 - /// - /// - /// Resource - /// - /// - /// - /// - /// Pagination size. - /// An opaque pagination token to fetch the next set of records. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetEnvironments(int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _confluentOrganizationOrganizationRestClient.CreateListEnvironmentsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint, pageToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _confluentOrganizationOrganizationRestClient.CreateListEnvironmentsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint, pageToken); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => SCEnvironmentRecord.DeserializeSCEnvironmentRecord(e), _confluentOrganizationOrganizationClientDiagnostics, Pipeline, "ConfluentOrganizationResource.GetEnvironments", "value", "nextLink", cancellationToken); - } - - /// - /// Get Environment details by environment Id - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId} - /// - /// - /// Operation Id - /// Organization_GetEnvironmentById - /// - /// - /// Default Api Version - /// 2024-02-13 - /// - /// - /// Resource - /// - /// - /// - /// - /// Confluent environment id. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetEnvironmentAsync(string environmentId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); - - using var scope = _confluentOrganizationOrganizationClientDiagnostics.CreateScope("ConfluentOrganizationResource.GetEnvironment"); - scope.Start(); - try - { - var response = await _confluentOrganizationOrganizationRestClient.GetEnvironmentByIdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get Environment details by environment Id - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId} - /// - /// - /// Operation Id - /// Organization_GetEnvironmentById - /// - /// - /// Default Api Version - /// 2024-02-13 - /// - /// - /// Resource - /// - /// - /// - /// - /// Confluent environment id. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetEnvironment(string environmentId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); - - using var scope = _confluentOrganizationOrganizationClientDiagnostics.CreateScope("ConfluentOrganizationResource.GetEnvironment"); - scope.Start(); - try - { - var response = _confluentOrganizationOrganizationRestClient.GetEnvironmentById(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists of all the clusters in a environment - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters - /// - /// - /// Operation Id - /// Organization_ListClusters - /// - /// - /// Default Api Version - /// 2024-02-13 - /// - /// - /// Resource - /// - /// - /// - /// - /// Confluent environment id. - /// Pagination size. - /// An opaque pagination token to fetch the next set of records. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetClustersAsync(string environmentId, int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => _confluentOrganizationOrganizationRestClient.CreateListClustersRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, pageSizeHint, pageToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _confluentOrganizationOrganizationRestClient.CreateListClustersNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, pageSizeHint, pageToken); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => SCClusterRecord.DeserializeSCClusterRecord(e), _confluentOrganizationOrganizationClientDiagnostics, Pipeline, "ConfluentOrganizationResource.GetClusters", "value", "nextLink", cancellationToken); - } - - /// - /// Lists of all the clusters in a environment - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters - /// - /// - /// Operation Id - /// Organization_ListClusters - /// - /// - /// Default Api Version - /// 2024-02-13 - /// - /// - /// Resource - /// - /// - /// - /// - /// Confluent environment id. - /// Pagination size. - /// An opaque pagination token to fetch the next set of records. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetClusters(string environmentId, int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => _confluentOrganizationOrganizationRestClient.CreateListClustersRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, pageSizeHint, pageToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _confluentOrganizationOrganizationRestClient.CreateListClustersNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, pageSizeHint, pageToken); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => SCClusterRecord.DeserializeSCClusterRecord(e), _confluentOrganizationOrganizationClientDiagnostics, Pipeline, "ConfluentOrganizationResource.GetClusters", "value", "nextLink", cancellationToken); - } - - /// - /// Get schema registry clusters - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/schemaRegistryClusters - /// - /// - /// Operation Id - /// Organization_ListSchemaRegistryClusters - /// - /// - /// Default Api Version - /// 2024-02-13 - /// - /// - /// Resource - /// - /// - /// - /// - /// Confluent environment id. - /// Pagination size. - /// An opaque pagination token to fetch the next set of records. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetSchemaRegistryClustersAsync(string environmentId, int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => _confluentOrganizationOrganizationRestClient.CreateListSchemaRegistryClustersRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, pageSizeHint, pageToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _confluentOrganizationOrganizationRestClient.CreateListSchemaRegistryClustersNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, pageSizeHint, pageToken); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => SchemaRegistryClusterRecord.DeserializeSchemaRegistryClusterRecord(e), _confluentOrganizationOrganizationClientDiagnostics, Pipeline, "ConfluentOrganizationResource.GetSchemaRegistryClusters", "value", "nextLink", cancellationToken); - } - - /// - /// Get schema registry clusters - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/schemaRegistryClusters - /// - /// - /// Operation Id - /// Organization_ListSchemaRegistryClusters - /// - /// - /// Default Api Version - /// 2024-02-13 - /// - /// - /// Resource - /// - /// - /// - /// - /// Confluent environment id. - /// Pagination size. - /// An opaque pagination token to fetch the next set of records. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetSchemaRegistryClusters(string environmentId, int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => _confluentOrganizationOrganizationRestClient.CreateListSchemaRegistryClustersRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, pageSizeHint, pageToken); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _confluentOrganizationOrganizationRestClient.CreateListSchemaRegistryClustersNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, pageSizeHint, pageToken); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => SchemaRegistryClusterRecord.DeserializeSchemaRegistryClusterRecord(e), _confluentOrganizationOrganizationClientDiagnostics, Pipeline, "ConfluentOrganizationResource.GetSchemaRegistryClusters", "value", "nextLink", cancellationToken); - } - /// /// cloud provider regions available for creating Schema Registry clusters. /// @@ -654,7 +424,7 @@ public virtual Pageable GetSchemaRegistryClusters(s /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -696,7 +466,7 @@ public virtual async Task> GetRegionsAsync(A /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -725,100 +495,6 @@ public virtual Response GetRegions(AccessListContent } } - /// - /// Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/createAPIKey - /// - /// - /// Operation Id - /// Organization_CreateApiKey - /// - /// - /// Default Api Version - /// 2024-02-13 - /// - /// - /// Resource - /// - /// - /// - /// - /// Confluent environment id. - /// Confluent kafka or schema registry cluster id. - /// Request payload for get creating API Key for schema registry Cluster ID or Kafka Cluster ID under a environment. - /// The cancellation token to use. - /// or is an empty string, and was expected to be non-empty. - /// , or is null. - public virtual async Task> CreateApiKeyAsync(string environmentId, string clusterId, ConfluentApiKeyCreateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); - Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _confluentOrganizationOrganizationClientDiagnostics.CreateScope("ConfluentOrganizationResource.CreateApiKey"); - scope.Start(); - try - { - var response = await _confluentOrganizationOrganizationRestClient.CreateApiKeyAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, clusterId, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/createAPIKey - /// - /// - /// Operation Id - /// Organization_CreateApiKey - /// - /// - /// Default Api Version - /// 2024-02-13 - /// - /// - /// Resource - /// - /// - /// - /// - /// Confluent environment id. - /// Confluent kafka or schema registry cluster id. - /// Request payload for get creating API Key for schema registry Cluster ID or Kafka Cluster ID under a environment. - /// The cancellation token to use. - /// or is an empty string, and was expected to be non-empty. - /// , or is null. - public virtual Response CreateApiKey(string environmentId, string clusterId, ConfluentApiKeyCreateContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); - Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _confluentOrganizationOrganizationClientDiagnostics.CreateScope("ConfluentOrganizationResource.CreateApiKey"); - scope.Start(); - try - { - var response = _confluentOrganizationOrganizationRestClient.CreateApiKey(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, clusterId, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Deletes API key of a kafka or schema registry cluster /// @@ -832,11 +508,7 @@ public virtual Response CreateApiKey(string environmentId /// /// /// Default Api Version - /// 2024-02-13 - /// - /// - /// Resource - /// + /// 2024-07-01 /// /// /// @@ -875,11 +547,7 @@ public virtual async Task DeleteClusterApiKeyAsync(string apiKeyId, Ca /// /// /// Default Api Version - /// 2024-02-13 - /// - /// - /// Resource - /// + /// 2024-07-01 /// /// /// @@ -918,11 +586,7 @@ public virtual Response DeleteClusterApiKey(string apiKeyId, CancellationToken c /// /// /// Default Api Version - /// 2024-02-13 - /// - /// - /// Resource - /// + /// 2024-07-01 /// /// /// @@ -961,11 +625,7 @@ public virtual async Task> GetClusterApiKeyAsync /// /// /// Default Api Version - /// 2024-02-13 - /// - /// - /// Resource - /// + /// 2024-07-01 /// /// /// @@ -991,186 +651,6 @@ public virtual Response GetClusterApiKey(string apiKeyId, } } - /// - /// Get schema registry cluster by Id - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/schemaRegistryClusters/{clusterId} - /// - /// - /// Operation Id - /// Organization_GetSchemaRegistryClusterById - /// - /// - /// Default Api Version - /// 2024-02-13 - /// - /// - /// Resource - /// - /// - /// - /// - /// Confluent environment id. - /// Confluent kafka or schema registry cluster id. - /// The cancellation token to use. - /// or is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> GetSchemaRegistryClusterAsync(string environmentId, string clusterId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); - Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); - - using var scope = _confluentOrganizationOrganizationClientDiagnostics.CreateScope("ConfluentOrganizationResource.GetSchemaRegistryCluster"); - scope.Start(); - try - { - var response = await _confluentOrganizationOrganizationRestClient.GetSchemaRegistryClusterByIdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, clusterId, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get schema registry cluster by Id - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/schemaRegistryClusters/{clusterId} - /// - /// - /// Operation Id - /// Organization_GetSchemaRegistryClusterById - /// - /// - /// Default Api Version - /// 2024-02-13 - /// - /// - /// Resource - /// - /// - /// - /// - /// Confluent environment id. - /// Confluent kafka or schema registry cluster id. - /// The cancellation token to use. - /// or is an empty string, and was expected to be non-empty. - /// or is null. - public virtual Response GetSchemaRegistryCluster(string environmentId, string clusterId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); - Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); - - using var scope = _confluentOrganizationOrganizationClientDiagnostics.CreateScope("ConfluentOrganizationResource.GetSchemaRegistryCluster"); - scope.Start(); - try - { - var response = _confluentOrganizationOrganizationRestClient.GetSchemaRegistryClusterById(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, clusterId, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get cluster by Id - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId} - /// - /// - /// Operation Id - /// Organization_GetClusterById - /// - /// - /// Default Api Version - /// 2024-02-13 - /// - /// - /// Resource - /// - /// - /// - /// - /// Confluent environment id. - /// Confluent kafka or schema registry cluster id. - /// The cancellation token to use. - /// or is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> GetClusterAsync(string environmentId, string clusterId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); - Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); - - using var scope = _confluentOrganizationOrganizationClientDiagnostics.CreateScope("ConfluentOrganizationResource.GetCluster"); - scope.Start(); - try - { - var response = await _confluentOrganizationOrganizationRestClient.GetClusterByIdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, clusterId, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get cluster by Id - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId} - /// - /// - /// Operation Id - /// Organization_GetClusterById - /// - /// - /// Default Api Version - /// 2024-02-13 - /// - /// - /// Resource - /// - /// - /// - /// - /// Confluent environment id. - /// Confluent kafka or schema registry cluster id. - /// The cancellation token to use. - /// or is an empty string, and was expected to be non-empty. - /// or is null. - public virtual Response GetCluster(string environmentId, string clusterId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); - Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); - - using var scope = _confluentOrganizationOrganizationClientDiagnostics.CreateScope("ConfluentOrganizationResource.GetCluster"); - scope.Start(); - try - { - var response = _confluentOrganizationOrganizationRestClient.GetClusterById(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, clusterId, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Organization users details /// @@ -1184,7 +664,7 @@ public virtual Response GetCluster(string environmentId, string /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -1222,7 +702,7 @@ public virtual async Task> GetAccessUsersAsync(Ac /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -1260,7 +740,7 @@ public virtual Response GetAccessUsers(AccessListContent c /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -1298,7 +778,7 @@ public virtual async Task> GetAccessSer /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -1336,7 +816,7 @@ public virtual Response GetAccessServiceAccounts /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -1374,7 +854,7 @@ public virtual async Task> GetAccessInvitat /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -1412,7 +892,7 @@ public virtual Response GetAccessInvitations(AccessL /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -1450,7 +930,7 @@ public virtual async Task> InviteUserAsync(Acce /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -1488,7 +968,7 @@ public virtual Response InviteUser(AccessInvitationConte /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -1526,7 +1006,7 @@ public virtual async Task> GetAccessEnviro /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -1564,7 +1044,7 @@ public virtual Response GetAccessEnvironments(Acces /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -1602,7 +1082,7 @@ public virtual async Task> GetAccessClustersAs /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -1640,7 +1120,7 @@ public virtual Response GetAccessClusters(AccessListCon /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -1678,7 +1158,7 @@ public virtual async Task> GetAccessRoleBi /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -1716,7 +1196,7 @@ public virtual Response GetAccessRoleBindings(Acces /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -1754,7 +1234,7 @@ public virtual async Task> CreateAccessRoleBin /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -1792,7 +1272,7 @@ public virtual Response CreateAccessRoleBinding(AccessR /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -1831,7 +1311,7 @@ public virtual async Task DeleteAccessRoleBindingAsync(string roleBind /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -1870,7 +1350,7 @@ public virtual Response DeleteAccessRoleBinding(string roleBindingId, Cancellati /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -1908,7 +1388,7 @@ public virtual async Task> GetAccessRo /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -1946,7 +1426,7 @@ public virtual Response GetAccessRoleBindingNam /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -2008,7 +1488,7 @@ public virtual async Task> AddTagAsync(s /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -2070,7 +1550,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -2127,7 +1607,7 @@ public virtual async Task> SetTagsAsync( /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -2184,7 +1664,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -2244,7 +1724,7 @@ public virtual async Task> RemoveTagAsyn /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConnectorResource.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConnectorResource.Serialization.cs new file mode 100644 index 000000000000..f97197d7070d --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConnectorResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.Confluent +{ + public partial class ConnectorResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ConnectorResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + ConnectorResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConnectorResource.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConnectorResource.cs new file mode 100644 index 000000000000..d7318a8558c5 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConnectorResource.cs @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Confluent +{ + /// + /// A Class representing a ConnectorResource along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetConnectorResource method. + /// Otherwise you can get one from its parent resource using the GetConnectorResource method. + /// + public partial class ConnectorResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The organizationName. + /// The environmentId. + /// The clusterId. + /// The connectorName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string connectorName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors/{connectorName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _connectorResourceConnectorClientDiagnostics; + private readonly ConnectorRestOperations _connectorResourceConnectorRestClient; + private readonly ConnectorResourceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Confluent/organizations/environments/clusters/connectors"; + + /// Initializes a new instance of the class for mocking. + protected ConnectorResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ConnectorResource(ArmClient client, ConnectorResourceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal ConnectorResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _connectorResourceConnectorClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Confluent", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string connectorResourceConnectorApiVersion); + _connectorResourceConnectorRestClient = new ConnectorRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, connectorResourceConnectorApiVersion); +#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 ConnectorResourceData 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 confluent connector by Name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _connectorResourceConnectorClientDiagnostics.CreateScope("ConnectorResource.Get"); + scope.Start(); + try + { + var response = await _connectorResourceConnectorRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get confluent connector by Name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _connectorResourceConnectorClientDiagnostics.CreateScope("ConnectorResource.Get"); + scope.Start(); + try + { + var response = _connectorResourceConnectorRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete confluent connector by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Delete + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _connectorResourceConnectorClientDiagnostics.CreateScope("ConnectorResource.Delete"); + scope.Start(); + try + { + var response = await _connectorResourceConnectorRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ConfluentArmOperation(_connectorResourceConnectorClientDiagnostics, Pipeline, _connectorResourceConnectorRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete confluent connector by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Delete + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _connectorResourceConnectorClientDiagnostics.CreateScope("ConnectorResource.Delete"); + scope.Start(); + try + { + var response = _connectorResourceConnectorRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new ConfluentArmOperation(_connectorResourceConnectorClientDiagnostics, Pipeline, _connectorResourceConnectorRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create confluent connector by Name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Confluent Connector resource model. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ConnectorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _connectorResourceConnectorClientDiagnostics.CreateScope("ConnectorResource.Update"); + scope.Start(); + try + { + var response = await _connectorResourceConnectorRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _connectorResourceConnectorRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ConfluentArmOperation(Response.FromValue(new ConnectorResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create confluent connector by Name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Confluent Connector resource model. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ConnectorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _connectorResourceConnectorClientDiagnostics.CreateScope("ConnectorResource.Update"); + scope.Start(); + try + { + var response = _connectorResourceConnectorRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var uri = _connectorResourceConnectorRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ConfluentArmOperation(Response.FromValue(new ConnectorResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConnectorResourceCollection.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConnectorResourceCollection.cs new file mode 100644 index 000000000000..55caf92b697a --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConnectorResourceCollection.cs @@ -0,0 +1,501 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Confluent +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetConnectorResources method from an instance of . + /// + public partial class ConnectorResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _connectorResourceConnectorClientDiagnostics; + private readonly ConnectorRestOperations _connectorResourceConnectorRestClient; + + /// Initializes a new instance of the class for mocking. + protected ConnectorResourceCollection() + { + } + + /// 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 ConnectorResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _connectorResourceConnectorClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Confluent", ConnectorResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ConnectorResource.ResourceType, out string connectorResourceConnectorApiVersion); + _connectorResourceConnectorRestClient = new ConnectorRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, connectorResourceConnectorApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SCClusterRecordResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SCClusterRecordResource.ResourceType), nameof(id)); + } + + /// + /// Create confluent connector by Name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Confluent connector name. + /// Confluent Connector resource model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string connectorName, ConnectorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _connectorResourceConnectorClientDiagnostics.CreateScope("ConnectorResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _connectorResourceConnectorRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, connectorName, data, cancellationToken).ConfigureAwait(false); + var uri = _connectorResourceConnectorRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, connectorName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ConfluentArmOperation(Response.FromValue(new ConnectorResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create confluent connector by Name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Confluent connector name. + /// Confluent Connector resource model. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string connectorName, ConnectorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _connectorResourceConnectorClientDiagnostics.CreateScope("ConnectorResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _connectorResourceConnectorRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, connectorName, data, cancellationToken); + var uri = _connectorResourceConnectorRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, connectorName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ConfluentArmOperation(Response.FromValue(new ConnectorResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get confluent connector by Name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent connector name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + + using var scope = _connectorResourceConnectorClientDiagnostics.CreateScope("ConnectorResourceCollection.Get"); + scope.Start(); + try + { + var response = await _connectorResourceConnectorRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, connectorName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get confluent connector by Name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent connector name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + + using var scope = _connectorResourceConnectorClientDiagnostics.CreateScope("ConnectorResourceCollection.Get"); + scope.Start(); + try + { + var response = _connectorResourceConnectorRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, connectorName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ConnectorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists all the connectors in a cluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors + /// + /// + /// Operation Id + /// Connector_List + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Pagination size. + /// An opaque pagination token to fetch the next set of records. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _connectorResourceConnectorRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, pageSizeHint, pageToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectorResourceConnectorRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, pageSizeHint, pageToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ConnectorResource(Client, ConnectorResourceData.DeserializeConnectorResourceData(e)), _connectorResourceConnectorClientDiagnostics, Pipeline, "ConnectorResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists all the connectors in a cluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors + /// + /// + /// Operation Id + /// Connector_List + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Pagination size. + /// An opaque pagination token to fetch the next set of records. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _connectorResourceConnectorRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, pageSizeHint, pageToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _connectorResourceConnectorRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, pageSizeHint, pageToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ConnectorResource(Client, ConnectorResourceData.DeserializeConnectorResourceData(e)), _connectorResourceConnectorClientDiagnostics, Pipeline, "ConnectorResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent connector name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + + using var scope = _connectorResourceConnectorClientDiagnostics.CreateScope("ConnectorResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _connectorResourceConnectorRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, connectorName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent connector name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + + using var scope = _connectorResourceConnectorClientDiagnostics.CreateScope("ConnectorResourceCollection.Exists"); + scope.Start(); + try + { + var response = _connectorResourceConnectorRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, connectorName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent connector name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + + using var scope = _connectorResourceConnectorClientDiagnostics.CreateScope("ConnectorResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _connectorResourceConnectorRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, connectorName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ConnectorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent connector name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + + using var scope = _connectorResourceConnectorClientDiagnostics.CreateScope("ConnectorResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _connectorResourceConnectorRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, connectorName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ConnectorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConnectorResourceData.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConnectorResourceData.Serialization.cs new file mode 100644 index 000000000000..a4f7fc54b4b4 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConnectorResourceData.Serialization.cs @@ -0,0 +1,202 @@ +// 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.Confluent.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Confluent +{ + public partial class ConnectorResourceData : 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(ConnectorResourceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(ConnectorBasicInfo)) + { + writer.WritePropertyName("connectorBasicInfo"u8); + writer.WriteObjectValue(ConnectorBasicInfo, options); + } + if (Optional.IsDefined(ConnectorServiceTypeInfo)) + { + writer.WritePropertyName("connectorServiceTypeInfo"u8); + writer.WriteObjectValue(ConnectorServiceTypeInfo, options); + } + if (Optional.IsDefined(PartnerConnectorInfo)) + { + writer.WritePropertyName("partnerConnectorInfo"u8); + writer.WriteObjectValue(PartnerConnectorInfo, options); + } + writer.WriteEndObject(); + } + + ConnectorResourceData 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(ConnectorResourceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectorResourceData(document.RootElement, options); + } + + internal static ConnectorResourceData DeserializeConnectorResourceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + ConnectorInfoBase connectorBasicInfo = default; + ConnectorServiceTypeInfoBase connectorServiceTypeInfo = default; + PartnerInfoBase partnerConnectorInfo = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + 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 (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("connectorBasicInfo"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectorBasicInfo = ConnectorInfoBase.DeserializeConnectorInfoBase(property0.Value, options); + continue; + } + if (property0.NameEquals("connectorServiceTypeInfo"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectorServiceTypeInfo = ConnectorServiceTypeInfoBase.DeserializeConnectorServiceTypeInfoBase(property0.Value, options); + continue; + } + if (property0.NameEquals("partnerConnectorInfo"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + partnerConnectorInfo = PartnerInfoBase.DeserializePartnerInfoBase(property0.Value, options); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectorResourceData( + id, + name, + type, + systemData, + connectorBasicInfo, + connectorServiceTypeInfo, + partnerConnectorInfo, + 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(ConnectorResourceData)} does not support writing '{options.Format}' format."); + } + } + + ConnectorResourceData 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 DeserializeConnectorResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectorResourceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConnectorResourceData.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConnectorResourceData.cs new file mode 100644 index 000000000000..1b51fe932246 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConnectorResourceData.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Confluent.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Confluent +{ + /// + /// A class representing the ConnectorResource data model. + /// Details of connector record + /// + public partial class ConnectorResourceData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ConnectorResourceData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Connector Info Base. + /// + /// Connector Service type info base properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + /// + /// The connection information consumed by applications. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + /// Keeps track of any properties unknown to the library. + internal ConnectorResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ConnectorInfoBase connectorBasicInfo, ConnectorServiceTypeInfoBase connectorServiceTypeInfo, PartnerInfoBase partnerConnectorInfo, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ConnectorBasicInfo = connectorBasicInfo; + ConnectorServiceTypeInfo = connectorServiceTypeInfo; + PartnerConnectorInfo = partnerConnectorInfo; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Connector Info Base. + public ConnectorInfoBase ConnectorBasicInfo { get; set; } + /// + /// Connector Service type info base properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + public ConnectorServiceTypeInfoBase ConnectorServiceTypeInfo { get; set; } + /// + /// The connection information consumed by applications. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + public PartnerInfoBase PartnerConnectorInfo { get; set; } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Extensions/ConfluentExtensions.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Extensions/ConfluentExtensions.cs index d725b662e498..390db254794b 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Extensions/ConfluentExtensions.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Extensions/ConfluentExtensions.cs @@ -52,6 +52,82 @@ public static ConfluentOrganizationResource GetConfluentOrganizationResource(thi return GetMockableConfluentArmClient(client).GetConfluentOrganizationResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SCEnvironmentRecordResource GetSCEnvironmentRecordResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableConfluentArmClient(client).GetSCEnvironmentRecordResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static SCClusterRecordResource GetSCClusterRecordResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableConfluentArmClient(client).GetSCClusterRecordResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static ConnectorResource GetConnectorResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableConfluentArmClient(client).GetConnectorResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static TopicRecordResource GetTopicRecordResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableConfluentArmClient(client).GetTopicRecordResource(id); + } + /// /// Gets a collection of ConfluentOrganizationResources in the ResourceGroupResource. /// @@ -82,7 +158,7 @@ public static ConfluentOrganizationCollection GetConfluentOrganizations(this Res /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -120,7 +196,7 @@ public static async Task> GetConfluentOr /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -158,7 +234,7 @@ public static Response GetConfluentOrganization(t /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -192,7 +268,7 @@ public static async Task> ValidateOrgani /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -226,7 +302,7 @@ public static Response ValidateOrganization(this /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -260,7 +336,7 @@ public static async Task> Valida /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -294,7 +370,7 @@ public static Response ValidateOrganizati /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -326,7 +402,7 @@ public static AsyncPageable GetMarketplaceAgreementsAsync(th /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -358,7 +434,7 @@ public static Pageable GetMarketplaceAgreements(this Subscri /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -390,7 +466,7 @@ public static async Task> CreateMarketplaceAgreemen /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -422,7 +498,7 @@ public static Response CreateMarketplaceAgreement(this Subsc /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -458,7 +534,7 @@ public static AsyncPageable GetConfluentOrganizat /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Extensions/MockableConfluentArmClient.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Extensions/MockableConfluentArmClient.cs index ebe6a745075c..ba1a8e509a28 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Extensions/MockableConfluentArmClient.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Extensions/MockableConfluentArmClient.cs @@ -45,5 +45,53 @@ public virtual ConfluentOrganizationResource GetConfluentOrganizationResource(Re ConfluentOrganizationResource.ValidateResourceId(id); return new ConfluentOrganizationResource(Client, id); } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SCEnvironmentRecordResource GetSCEnvironmentRecordResource(ResourceIdentifier id) + { + SCEnvironmentRecordResource.ValidateResourceId(id); + return new SCEnvironmentRecordResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SCClusterRecordResource GetSCClusterRecordResource(ResourceIdentifier id) + { + SCClusterRecordResource.ValidateResourceId(id); + return new SCClusterRecordResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual ConnectorResource GetConnectorResource(ResourceIdentifier id) + { + ConnectorResource.ValidateResourceId(id); + return new ConnectorResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual TopicRecordResource GetTopicRecordResource(ResourceIdentifier id) + { + TopicRecordResource.ValidateResourceId(id); + return new TopicRecordResource(Client, id); + } } } diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Extensions/MockableConfluentResourceGroupResource.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Extensions/MockableConfluentResourceGroupResource.cs index 3c5ce9924282..84a496460939 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Extensions/MockableConfluentResourceGroupResource.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Extensions/MockableConfluentResourceGroupResource.cs @@ -61,7 +61,7 @@ public virtual ConfluentOrganizationCollection GetConfluentOrganizations() /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -92,7 +92,7 @@ public virtual async Task> GetConfluentO /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -123,7 +123,7 @@ public virtual Response GetConfluentOrganization( /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -164,7 +164,7 @@ public virtual async Task> ValidateOrgan /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -205,7 +205,7 @@ public virtual Response ValidateOrganization(stri /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -246,7 +246,7 @@ public virtual async Task> Valid /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Extensions/MockableConfluentSubscriptionResource.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Extensions/MockableConfluentSubscriptionResource.cs index a841312a5273..c20825b7cfea 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Extensions/MockableConfluentSubscriptionResource.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Extensions/MockableConfluentSubscriptionResource.cs @@ -59,7 +59,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -85,7 +85,7 @@ public virtual AsyncPageable GetMarketplaceAgreementsAsync(C /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -111,7 +111,7 @@ public virtual Pageable GetMarketplaceAgreements(Cancellatio /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -146,7 +146,7 @@ public virtual async Task> CreateMarketplaceAgreeme /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// @@ -181,7 +181,7 @@ public virtual Response CreateMarketplaceAgreement(Confluent /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual AsyncPageable GetConfluentOrganiza /// /// /// Default Api Version - /// 2024-02-13 + /// 2024-07-01 /// /// /// Resource diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AuthType.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AuthType.cs new file mode 100644 index 000000000000..acb33d21fac9 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AuthType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// Kafka Connector Auth Type. + public readonly partial struct AuthType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AuthType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ServiceAccountValue = "SERVICE_ACCOUNT"; + private const string KafkaApiKEYValue = "KAFKA_API_KEY"; + + /// SERVICE_ACCOUNT. + public static AuthType ServiceAccount { get; } = new AuthType(ServiceAccountValue); + /// KAFKA_API_KEY. + public static AuthType KafkaApiKEY { get; } = new AuthType(KafkaApiKEYValue); + /// Determines if two values are the same. + public static bool operator ==(AuthType left, AuthType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AuthType left, AuthType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AuthType(string value) => new AuthType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AuthType other && Equals(other); + /// + public bool Equals(AuthType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureBlobStorageSinkConnectorServiceInfo.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureBlobStorageSinkConnectorServiceInfo.Serialization.cs new file mode 100644 index 000000000000..04cf2443796c --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureBlobStorageSinkConnectorServiceInfo.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Confluent.Models +{ + public partial class AzureBlobStorageSinkConnectorServiceInfo : 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(AzureBlobStorageSinkConnectorServiceInfo)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(StorageAccountName)) + { + writer.WritePropertyName("storageAccountName"u8); + writer.WriteStringValue(StorageAccountName); + } + if (Optional.IsDefined(StorageAccountKey)) + { + writer.WritePropertyName("storageAccountKey"u8); + writer.WriteStringValue(StorageAccountKey); + } + if (Optional.IsDefined(StorageContainerName)) + { + writer.WritePropertyName("storageContainerName"u8); + writer.WriteStringValue(StorageContainerName); + } + } + + AzureBlobStorageSinkConnectorServiceInfo 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(AzureBlobStorageSinkConnectorServiceInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureBlobStorageSinkConnectorServiceInfo(document.RootElement, options); + } + + internal static AzureBlobStorageSinkConnectorServiceInfo DeserializeAzureBlobStorageSinkConnectorServiceInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string storageAccountName = default; + string storageAccountKey = default; + string storageContainerName = default; + ConnectorServiceType connectorServiceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("storageAccountName"u8)) + { + storageAccountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageAccountKey"u8)) + { + storageAccountKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageContainerName"u8)) + { + storageContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectorServiceType"u8)) + { + connectorServiceType = new ConnectorServiceType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureBlobStorageSinkConnectorServiceInfo(connectorServiceType, serializedAdditionalRawData, storageAccountName, storageAccountKey, storageContainerName); + } + + 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(AzureBlobStorageSinkConnectorServiceInfo)} does not support writing '{options.Format}' format."); + } + } + + AzureBlobStorageSinkConnectorServiceInfo 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 DeserializeAzureBlobStorageSinkConnectorServiceInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureBlobStorageSinkConnectorServiceInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureBlobStorageSinkConnectorServiceInfo.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureBlobStorageSinkConnectorServiceInfo.cs new file mode 100644 index 000000000000..4ac48c4f67d7 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureBlobStorageSinkConnectorServiceInfo.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// The authentication info when auth_type is azureBlobStorageSinkConnector. + public partial class AzureBlobStorageSinkConnectorServiceInfo : ConnectorServiceTypeInfoBase + { + /// Initializes a new instance of . + public AzureBlobStorageSinkConnectorServiceInfo() + { + ConnectorServiceType = ConnectorServiceType.AzureBlobStorageSinkConnector; + } + + /// Initializes a new instance of . + /// The connector service type. + /// Keeps track of any properties unknown to the library. + /// Azure Blob Storage Account Name. + /// Azure Blob Storage Account Key. + /// Azure Blob Storage Account Container Name. + internal AzureBlobStorageSinkConnectorServiceInfo(ConnectorServiceType connectorServiceType, IDictionary serializedAdditionalRawData, string storageAccountName, string storageAccountKey, string storageContainerName) : base(connectorServiceType, serializedAdditionalRawData) + { + StorageAccountName = storageAccountName; + StorageAccountKey = storageAccountKey; + StorageContainerName = storageContainerName; + ConnectorServiceType = connectorServiceType; + } + + /// Azure Blob Storage Account Name. + public string StorageAccountName { get; set; } + /// Azure Blob Storage Account Key. + public string StorageAccountKey { get; set; } + /// Azure Blob Storage Account Container Name. + public string StorageContainerName { get; set; } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureBlobStorageSourceConnectorServiceInfo.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureBlobStorageSourceConnectorServiceInfo.Serialization.cs new file mode 100644 index 000000000000..093ded2405d2 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureBlobStorageSourceConnectorServiceInfo.Serialization.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Confluent.Models +{ + public partial class AzureBlobStorageSourceConnectorServiceInfo : 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(AzureBlobStorageSourceConnectorServiceInfo)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(StorageAccountName)) + { + writer.WritePropertyName("storageAccountName"u8); + writer.WriteStringValue(StorageAccountName); + } + if (Optional.IsDefined(StorageAccountKey)) + { + writer.WritePropertyName("storageAccountKey"u8); + writer.WriteStringValue(StorageAccountKey); + } + if (Optional.IsDefined(StorageContainerName)) + { + writer.WritePropertyName("storageContainerName"u8); + writer.WriteStringValue(StorageContainerName); + } + } + + AzureBlobStorageSourceConnectorServiceInfo 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(AzureBlobStorageSourceConnectorServiceInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureBlobStorageSourceConnectorServiceInfo(document.RootElement, options); + } + + internal static AzureBlobStorageSourceConnectorServiceInfo DeserializeAzureBlobStorageSourceConnectorServiceInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string storageAccountName = default; + string storageAccountKey = default; + string storageContainerName = default; + ConnectorServiceType connectorServiceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("storageAccountName"u8)) + { + storageAccountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageAccountKey"u8)) + { + storageAccountKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageContainerName"u8)) + { + storageContainerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectorServiceType"u8)) + { + connectorServiceType = new ConnectorServiceType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureBlobStorageSourceConnectorServiceInfo(connectorServiceType, serializedAdditionalRawData, storageAccountName, storageAccountKey, storageContainerName); + } + + 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(AzureBlobStorageSourceConnectorServiceInfo)} does not support writing '{options.Format}' format."); + } + } + + AzureBlobStorageSourceConnectorServiceInfo 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 DeserializeAzureBlobStorageSourceConnectorServiceInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureBlobStorageSourceConnectorServiceInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureBlobStorageSourceConnectorServiceInfo.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureBlobStorageSourceConnectorServiceInfo.cs new file mode 100644 index 000000000000..b964817dc8b4 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureBlobStorageSourceConnectorServiceInfo.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// The connector service type is AzureBlobStorageSourceConnector. + public partial class AzureBlobStorageSourceConnectorServiceInfo : ConnectorServiceTypeInfoBase + { + /// Initializes a new instance of . + public AzureBlobStorageSourceConnectorServiceInfo() + { + ConnectorServiceType = ConnectorServiceType.AzureBlobStorageSourceConnector; + } + + /// Initializes a new instance of . + /// The connector service type. + /// Keeps track of any properties unknown to the library. + /// Azure Blob Storage Account Name. + /// Azure Blob Storage Account Key. + /// Azure Blob Storage Account Container Name. + internal AzureBlobStorageSourceConnectorServiceInfo(ConnectorServiceType connectorServiceType, IDictionary serializedAdditionalRawData, string storageAccountName, string storageAccountKey, string storageContainerName) : base(connectorServiceType, serializedAdditionalRawData) + { + StorageAccountName = storageAccountName; + StorageAccountKey = storageAccountKey; + StorageContainerName = storageContainerName; + ConnectorServiceType = connectorServiceType; + } + + /// Azure Blob Storage Account Name. + public string StorageAccountName { get; set; } + /// Azure Blob Storage Account Key. + public string StorageAccountKey { get; set; } + /// Azure Blob Storage Account Container Name. + public string StorageContainerName { get; set; } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureCosmosDBSinkConnectorServiceInfo.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureCosmosDBSinkConnectorServiceInfo.Serialization.cs new file mode 100644 index 000000000000..3c3af814720f --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureCosmosDBSinkConnectorServiceInfo.Serialization.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Confluent.Models +{ + public partial class AzureCosmosDBSinkConnectorServiceInfo : 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(AzureCosmosDBSinkConnectorServiceInfo)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(CosmosDatabaseName)) + { + writer.WritePropertyName("cosmosDatabaseName"u8); + writer.WriteStringValue(CosmosDatabaseName); + } + if (Optional.IsDefined(CosmosMasterKey)) + { + writer.WritePropertyName("cosmosMasterKey"u8); + writer.WriteStringValue(CosmosMasterKey); + } + if (Optional.IsDefined(CosmosConnectionEndpoint)) + { + writer.WritePropertyName("cosmosConnectionEndpoint"u8); + writer.WriteStringValue(CosmosConnectionEndpoint); + } + if (Optional.IsDefined(CosmosContainersTopicMapping)) + { + writer.WritePropertyName("cosmosContainersTopicMapping"u8); + writer.WriteStringValue(CosmosContainersTopicMapping); + } + if (Optional.IsDefined(CosmosIdStrategy)) + { + writer.WritePropertyName("cosmosIdStrategy"u8); + writer.WriteStringValue(CosmosIdStrategy); + } + } + + AzureCosmosDBSinkConnectorServiceInfo 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(AzureCosmosDBSinkConnectorServiceInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureCosmosDBSinkConnectorServiceInfo(document.RootElement, options); + } + + internal static AzureCosmosDBSinkConnectorServiceInfo DeserializeAzureCosmosDBSinkConnectorServiceInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string cosmosDatabaseName = default; + string cosmosMasterKey = default; + string cosmosConnectionEndpoint = default; + string cosmosContainersTopicMapping = default; + string cosmosIdStrategy = default; + ConnectorServiceType connectorServiceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cosmosDatabaseName"u8)) + { + cosmosDatabaseName = property.Value.GetString(); + continue; + } + if (property.NameEquals("cosmosMasterKey"u8)) + { + cosmosMasterKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("cosmosConnectionEndpoint"u8)) + { + cosmosConnectionEndpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("cosmosContainersTopicMapping"u8)) + { + cosmosContainersTopicMapping = property.Value.GetString(); + continue; + } + if (property.NameEquals("cosmosIdStrategy"u8)) + { + cosmosIdStrategy = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectorServiceType"u8)) + { + connectorServiceType = new ConnectorServiceType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureCosmosDBSinkConnectorServiceInfo( + connectorServiceType, + serializedAdditionalRawData, + cosmosDatabaseName, + cosmosMasterKey, + cosmosConnectionEndpoint, + cosmosContainersTopicMapping, + cosmosIdStrategy); + } + + 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(AzureCosmosDBSinkConnectorServiceInfo)} does not support writing '{options.Format}' format."); + } + } + + AzureCosmosDBSinkConnectorServiceInfo 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 DeserializeAzureCosmosDBSinkConnectorServiceInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureCosmosDBSinkConnectorServiceInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureCosmosDBSinkConnectorServiceInfo.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureCosmosDBSinkConnectorServiceInfo.cs new file mode 100644 index 000000000000..dd37cfc47017 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureCosmosDBSinkConnectorServiceInfo.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// The authentication info when auth_type is AzureCosmosDBSinkConnector. + public partial class AzureCosmosDBSinkConnectorServiceInfo : ConnectorServiceTypeInfoBase + { + /// Initializes a new instance of . + public AzureCosmosDBSinkConnectorServiceInfo() + { + ConnectorServiceType = ConnectorServiceType.AzureCosmosDBSinkConnector; + } + + /// Initializes a new instance of . + /// The connector service type. + /// Keeps track of any properties unknown to the library. + /// Azure Cosmos Database Name. + /// Azure Cosmos Database Master Key. + /// Azure Cosmos Database Connection Endpoint. + /// Azure Cosmos Database Containers Topic Mapping. + /// Azure Cosmos Database Id Strategy. + internal AzureCosmosDBSinkConnectorServiceInfo(ConnectorServiceType connectorServiceType, IDictionary serializedAdditionalRawData, string cosmosDatabaseName, string cosmosMasterKey, string cosmosConnectionEndpoint, string cosmosContainersTopicMapping, string cosmosIdStrategy) : base(connectorServiceType, serializedAdditionalRawData) + { + CosmosDatabaseName = cosmosDatabaseName; + CosmosMasterKey = cosmosMasterKey; + CosmosConnectionEndpoint = cosmosConnectionEndpoint; + CosmosContainersTopicMapping = cosmosContainersTopicMapping; + CosmosIdStrategy = cosmosIdStrategy; + ConnectorServiceType = connectorServiceType; + } + + /// Azure Cosmos Database Name. + public string CosmosDatabaseName { get; set; } + /// Azure Cosmos Database Master Key. + public string CosmosMasterKey { get; set; } + /// Azure Cosmos Database Connection Endpoint. + public string CosmosConnectionEndpoint { get; set; } + /// Azure Cosmos Database Containers Topic Mapping. + public string CosmosContainersTopicMapping { get; set; } + /// Azure Cosmos Database Id Strategy. + public string CosmosIdStrategy { get; set; } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureCosmosDBSourceConnectorServiceInfo.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureCosmosDBSourceConnectorServiceInfo.Serialization.cs new file mode 100644 index 000000000000..0928c33aeacf --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureCosmosDBSourceConnectorServiceInfo.Serialization.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Confluent.Models +{ + public partial class AzureCosmosDBSourceConnectorServiceInfo : 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(AzureCosmosDBSourceConnectorServiceInfo)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(CosmosDatabaseName)) + { + writer.WritePropertyName("cosmosDatabaseName"u8); + writer.WriteStringValue(CosmosDatabaseName); + } + if (Optional.IsDefined(CosmosMasterKey)) + { + writer.WritePropertyName("cosmosMasterKey"u8); + writer.WriteStringValue(CosmosMasterKey); + } + if (Optional.IsDefined(CosmosConnectionEndpoint)) + { + writer.WritePropertyName("cosmosConnectionEndpoint"u8); + writer.WriteStringValue(CosmosConnectionEndpoint); + } + if (Optional.IsDefined(CosmosContainersTopicMapping)) + { + writer.WritePropertyName("cosmosContainersTopicMapping"u8); + writer.WriteStringValue(CosmosContainersTopicMapping); + } + if (Optional.IsDefined(CosmosMessageKeyEnabled)) + { + writer.WritePropertyName("cosmosMessageKeyEnabled"u8); + writer.WriteBooleanValue(CosmosMessageKeyEnabled.Value); + } + if (Optional.IsDefined(CosmosMessageKeyField)) + { + writer.WritePropertyName("cosmosMessageKeyField"u8); + writer.WriteStringValue(CosmosMessageKeyField); + } + } + + AzureCosmosDBSourceConnectorServiceInfo 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(AzureCosmosDBSourceConnectorServiceInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureCosmosDBSourceConnectorServiceInfo(document.RootElement, options); + } + + internal static AzureCosmosDBSourceConnectorServiceInfo DeserializeAzureCosmosDBSourceConnectorServiceInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string cosmosDatabaseName = default; + string cosmosMasterKey = default; + string cosmosConnectionEndpoint = default; + string cosmosContainersTopicMapping = default; + bool? cosmosMessageKeyEnabled = default; + string cosmosMessageKeyField = default; + ConnectorServiceType connectorServiceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cosmosDatabaseName"u8)) + { + cosmosDatabaseName = property.Value.GetString(); + continue; + } + if (property.NameEquals("cosmosMasterKey"u8)) + { + cosmosMasterKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("cosmosConnectionEndpoint"u8)) + { + cosmosConnectionEndpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("cosmosContainersTopicMapping"u8)) + { + cosmosContainersTopicMapping = property.Value.GetString(); + continue; + } + if (property.NameEquals("cosmosMessageKeyEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cosmosMessageKeyEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("cosmosMessageKeyField"u8)) + { + cosmosMessageKeyField = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectorServiceType"u8)) + { + connectorServiceType = new ConnectorServiceType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureCosmosDBSourceConnectorServiceInfo( + connectorServiceType, + serializedAdditionalRawData, + cosmosDatabaseName, + cosmosMasterKey, + cosmosConnectionEndpoint, + cosmosContainersTopicMapping, + cosmosMessageKeyEnabled, + cosmosMessageKeyField); + } + + 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(AzureCosmosDBSourceConnectorServiceInfo)} does not support writing '{options.Format}' format."); + } + } + + AzureCosmosDBSourceConnectorServiceInfo 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 DeserializeAzureCosmosDBSourceConnectorServiceInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureCosmosDBSourceConnectorServiceInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureCosmosDBSourceConnectorServiceInfo.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureCosmosDBSourceConnectorServiceInfo.cs new file mode 100644 index 000000000000..f60ac38724a2 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureCosmosDBSourceConnectorServiceInfo.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// The authentication info when auth_type is AzureCosmosDBSourceConnector. + public partial class AzureCosmosDBSourceConnectorServiceInfo : ConnectorServiceTypeInfoBase + { + /// Initializes a new instance of . + public AzureCosmosDBSourceConnectorServiceInfo() + { + ConnectorServiceType = ConnectorServiceType.AzureCosmosDBSourceConnector; + } + + /// Initializes a new instance of . + /// The connector service type. + /// Keeps track of any properties unknown to the library. + /// Azure Cosmos Database Name. + /// Azure Cosmos Database Master Key. + /// Azure Cosmos Database Connection Endpoint. + /// Azure Cosmos Database Containers Topic Mapping. + /// Azure Cosmos Database Message Key Enabled. + /// Azure Cosmos Database Message Key Field. + internal AzureCosmosDBSourceConnectorServiceInfo(ConnectorServiceType connectorServiceType, IDictionary serializedAdditionalRawData, string cosmosDatabaseName, string cosmosMasterKey, string cosmosConnectionEndpoint, string cosmosContainersTopicMapping, bool? cosmosMessageKeyEnabled, string cosmosMessageKeyField) : base(connectorServiceType, serializedAdditionalRawData) + { + CosmosDatabaseName = cosmosDatabaseName; + CosmosMasterKey = cosmosMasterKey; + CosmosConnectionEndpoint = cosmosConnectionEndpoint; + CosmosContainersTopicMapping = cosmosContainersTopicMapping; + CosmosMessageKeyEnabled = cosmosMessageKeyEnabled; + CosmosMessageKeyField = cosmosMessageKeyField; + ConnectorServiceType = connectorServiceType; + } + + /// Azure Cosmos Database Name. + public string CosmosDatabaseName { get; set; } + /// Azure Cosmos Database Master Key. + public string CosmosMasterKey { get; set; } + /// Azure Cosmos Database Connection Endpoint. + public string CosmosConnectionEndpoint { get; set; } + /// Azure Cosmos Database Containers Topic Mapping. + public string CosmosContainersTopicMapping { get; set; } + /// Azure Cosmos Database Message Key Enabled. + public bool? CosmosMessageKeyEnabled { get; set; } + /// Azure Cosmos Database Message Key Field. + public string CosmosMessageKeyField { get; set; } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureSynapseAnalyticsSinkConnectorServiceInfo.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureSynapseAnalyticsSinkConnectorServiceInfo.Serialization.cs new file mode 100644 index 000000000000..920423e6452a --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureSynapseAnalyticsSinkConnectorServiceInfo.Serialization.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Confluent.Models +{ + public partial class AzureSynapseAnalyticsSinkConnectorServiceInfo : 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(AzureSynapseAnalyticsSinkConnectorServiceInfo)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(SynapseSqlServerName)) + { + writer.WritePropertyName("synapseSqlServerName"u8); + writer.WriteStringValue(SynapseSqlServerName); + } + if (Optional.IsDefined(SynapseSqlUser)) + { + writer.WritePropertyName("synapseSqlUser"u8); + writer.WriteStringValue(SynapseSqlUser); + } + if (Optional.IsDefined(SynapseSqlPassword)) + { + writer.WritePropertyName("synapseSqlPassword"u8); + writer.WriteStringValue(SynapseSqlPassword); + } + if (Optional.IsDefined(SynapseSqlDatabaseName)) + { + writer.WritePropertyName("synapseSqlDatabaseName"u8); + writer.WriteStringValue(SynapseSqlDatabaseName); + } + } + + AzureSynapseAnalyticsSinkConnectorServiceInfo 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(AzureSynapseAnalyticsSinkConnectorServiceInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureSynapseAnalyticsSinkConnectorServiceInfo(document.RootElement, options); + } + + internal static AzureSynapseAnalyticsSinkConnectorServiceInfo DeserializeAzureSynapseAnalyticsSinkConnectorServiceInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string synapseSqlServerName = default; + string synapseSqlUser = default; + string synapseSqlPassword = default; + string synapseSqlDatabaseName = default; + ConnectorServiceType connectorServiceType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("synapseSqlServerName"u8)) + { + synapseSqlServerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("synapseSqlUser"u8)) + { + synapseSqlUser = property.Value.GetString(); + continue; + } + if (property.NameEquals("synapseSqlPassword"u8)) + { + synapseSqlPassword = property.Value.GetString(); + continue; + } + if (property.NameEquals("synapseSqlDatabaseName"u8)) + { + synapseSqlDatabaseName = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectorServiceType"u8)) + { + connectorServiceType = new ConnectorServiceType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureSynapseAnalyticsSinkConnectorServiceInfo( + connectorServiceType, + serializedAdditionalRawData, + synapseSqlServerName, + synapseSqlUser, + synapseSqlPassword, + synapseSqlDatabaseName); + } + + 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(AzureSynapseAnalyticsSinkConnectorServiceInfo)} does not support writing '{options.Format}' format."); + } + } + + AzureSynapseAnalyticsSinkConnectorServiceInfo 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 DeserializeAzureSynapseAnalyticsSinkConnectorServiceInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureSynapseAnalyticsSinkConnectorServiceInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureSynapseAnalyticsSinkConnectorServiceInfo.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureSynapseAnalyticsSinkConnectorServiceInfo.cs new file mode 100644 index 000000000000..e7c7cc2a9882 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/AzureSynapseAnalyticsSinkConnectorServiceInfo.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// The authentication info when auth_type is AzureSynapseAnalyticsSinkConnector. + public partial class AzureSynapseAnalyticsSinkConnectorServiceInfo : ConnectorServiceTypeInfoBase + { + /// Initializes a new instance of . + public AzureSynapseAnalyticsSinkConnectorServiceInfo() + { + ConnectorServiceType = ConnectorServiceType.AzureSynapseAnalyticsSinkConnector; + } + + /// Initializes a new instance of . + /// The connector service type. + /// Keeps track of any properties unknown to the library. + /// Azure Synapse Analytics SQL Server Name. + /// Azure Synapse SQL login details. + /// Azure Synapse SQL login details. + /// Azure Synapse Dedicated SQL Pool Database Name. + internal AzureSynapseAnalyticsSinkConnectorServiceInfo(ConnectorServiceType connectorServiceType, IDictionary serializedAdditionalRawData, string synapseSqlServerName, string synapseSqlUser, string synapseSqlPassword, string synapseSqlDatabaseName) : base(connectorServiceType, serializedAdditionalRawData) + { + SynapseSqlServerName = synapseSqlServerName; + SynapseSqlUser = synapseSqlUser; + SynapseSqlPassword = synapseSqlPassword; + SynapseSqlDatabaseName = synapseSqlDatabaseName; + ConnectorServiceType = connectorServiceType; + } + + /// Azure Synapse Analytics SQL Server Name. + public string SynapseSqlServerName { get; set; } + /// Azure Synapse SQL login details. + public string SynapseSqlUser { get; set; } + /// Azure Synapse SQL login details. + public string SynapseSqlPassword { get; set; } + /// Azure Synapse Dedicated SQL Pool Database Name. + public string SynapseSqlDatabaseName { get; set; } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ClusterConfigEntity.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ClusterConfigEntity.cs index 13c5cc9560b1..887cbb783e6b 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ClusterConfigEntity.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ClusterConfigEntity.cs @@ -46,7 +46,7 @@ internal partial class ClusterConfigEntity private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ClusterConfigEntity() + public ClusterConfigEntity() { } @@ -60,6 +60,6 @@ internal ClusterConfigEntity(string kind, IDictionary serial } /// The lifecycle phase of the cluster. - public string Kind { get; } + public string Kind { get; set; } } } diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ClusterStatusEntity.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ClusterStatusEntity.cs index b12a7a3e2c52..ae31f30a9b1f 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ClusterStatusEntity.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ClusterStatusEntity.cs @@ -46,7 +46,7 @@ public partial class ClusterStatusEntity private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ClusterStatusEntity() + public ClusterStatusEntity() { } @@ -62,8 +62,8 @@ internal ClusterStatusEntity(string phase, int? cku, IDictionary The lifecycle phase of the cluster. - public string Phase { get; } + public string Phase { get; set; } /// The number of Confluent Kafka Units. - public int? Cku { get; } + public int? Cku { get; set; } } } diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorClass.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorClass.cs new file mode 100644 index 000000000000..2aa18e50bd81 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorClass.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// Connector Class. + public readonly partial struct ConnectorClass : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ConnectorClass(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AzureblobsourceValue = "AZUREBLOBSOURCE"; + private const string AzureblobsinkValue = "AZUREBLOBSINK"; + + /// AZUREBLOBSOURCE. + public static ConnectorClass Azureblobsource { get; } = new ConnectorClass(AzureblobsourceValue); + /// AZUREBLOBSINK. + public static ConnectorClass Azureblobsink { get; } = new ConnectorClass(AzureblobsinkValue); + /// Determines if two values are the same. + public static bool operator ==(ConnectorClass left, ConnectorClass right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ConnectorClass left, ConnectorClass right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ConnectorClass(string value) => new ConnectorClass(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConnectorClass other && Equals(other); + /// + public bool Equals(ConnectorClass other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorInfoBase.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorInfoBase.Serialization.cs new file mode 100644 index 000000000000..ddbcc2076927 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorInfoBase.Serialization.cs @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Confluent.Models +{ + public partial class ConnectorInfoBase : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectorInfoBase)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ConnectorType)) + { + writer.WritePropertyName("connectorType"u8); + writer.WriteStringValue(ConnectorType.Value.ToString()); + } + if (Optional.IsDefined(ConnectorClass)) + { + writer.WritePropertyName("connectorClass"u8); + writer.WriteStringValue(ConnectorClass.Value.ToString()); + } + if (Optional.IsDefined(ConnectorName)) + { + writer.WritePropertyName("connectorName"u8); + writer.WriteStringValue(ConnectorName); + } + if (Optional.IsDefined(ConnectorId)) + { + writer.WritePropertyName("connectorId"u8); + writer.WriteStringValue(ConnectorId); + } + if (Optional.IsDefined(ConnectorState)) + { + writer.WritePropertyName("connectorState"u8); + writer.WriteStringValue(ConnectorState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConnectorInfoBase 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(ConnectorInfoBase)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectorInfoBase(document.RootElement, options); + } + + internal static ConnectorInfoBase DeserializeConnectorInfoBase(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConnectorType? connectorType = default; + ConnectorClass? connectorClass = default; + string connectorName = default; + string connectorId = default; + ConnectorStatus? connectorState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("connectorType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectorType = new ConnectorType(property.Value.GetString()); + continue; + } + if (property.NameEquals("connectorClass"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectorClass = new ConnectorClass(property.Value.GetString()); + continue; + } + if (property.NameEquals("connectorName"u8)) + { + connectorName = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectorId"u8)) + { + connectorId = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectorState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectorState = new ConnectorStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ConnectorInfoBase( + connectorType, + connectorClass, + connectorName, + connectorId, + connectorState, + 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(ConnectorInfoBase)} does not support writing '{options.Format}' format."); + } + } + + ConnectorInfoBase 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 DeserializeConnectorInfoBase(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectorInfoBase)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorInfoBase.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorInfoBase.cs new file mode 100644 index 000000000000..754d532f3809 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorInfoBase.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// Connector Info Base properties. + public partial class ConnectorInfoBase + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ConnectorInfoBase() + { + } + + /// Initializes a new instance of . + /// Connector Type. + /// Connector Class. + /// Connector Name. + /// Connector Id. + /// Connector Status. + /// Keeps track of any properties unknown to the library. + internal ConnectorInfoBase(ConnectorType? connectorType, ConnectorClass? connectorClass, string connectorName, string connectorId, ConnectorStatus? connectorState, IDictionary serializedAdditionalRawData) + { + ConnectorType = connectorType; + ConnectorClass = connectorClass; + ConnectorName = connectorName; + ConnectorId = connectorId; + ConnectorState = connectorState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Connector Type. + public ConnectorType? ConnectorType { get; set; } + /// Connector Class. + public ConnectorClass? ConnectorClass { get; set; } + /// Connector Name. + public string ConnectorName { get; set; } + /// Connector Id. + public string ConnectorId { get; set; } + /// Connector Status. + public ConnectorStatus? ConnectorState { get; set; } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorServiceType.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorServiceType.cs new file mode 100644 index 000000000000..89662b3fc2d2 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorServiceType.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// The connector service type. + internal readonly partial struct ConnectorServiceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ConnectorServiceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AzureBlobStorageSinkConnectorValue = "AzureBlobStorageSinkConnector"; + private const string AzureBlobStorageSourceConnectorValue = "AzureBlobStorageSourceConnector"; + private const string AzureCosmosDBSinkConnectorValue = "AzureCosmosDBSinkConnector"; + private const string AzureCosmosDBSourceConnectorValue = "AzureCosmosDBSourceConnector"; + private const string AzureSynapseAnalyticsSinkConnectorValue = "AzureSynapseAnalyticsSinkConnector"; + + /// AzureBlobStorageSinkConnector. + public static ConnectorServiceType AzureBlobStorageSinkConnector { get; } = new ConnectorServiceType(AzureBlobStorageSinkConnectorValue); + /// AzureBlobStorageSourceConnector. + public static ConnectorServiceType AzureBlobStorageSourceConnector { get; } = new ConnectorServiceType(AzureBlobStorageSourceConnectorValue); + /// AzureCosmosDBSinkConnector. + public static ConnectorServiceType AzureCosmosDBSinkConnector { get; } = new ConnectorServiceType(AzureCosmosDBSinkConnectorValue); + /// AzureCosmosDBSourceConnector. + public static ConnectorServiceType AzureCosmosDBSourceConnector { get; } = new ConnectorServiceType(AzureCosmosDBSourceConnectorValue); + /// AzureSynapseAnalyticsSinkConnector. + public static ConnectorServiceType AzureSynapseAnalyticsSinkConnector { get; } = new ConnectorServiceType(AzureSynapseAnalyticsSinkConnectorValue); + /// Determines if two values are the same. + public static bool operator ==(ConnectorServiceType left, ConnectorServiceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ConnectorServiceType left, ConnectorServiceType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ConnectorServiceType(string value) => new ConnectorServiceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConnectorServiceType other && Equals(other); + /// + public bool Equals(ConnectorServiceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorServiceTypeInfoBase.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorServiceTypeInfoBase.Serialization.cs new file mode 100644 index 000000000000..8cfe8d77123e --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorServiceTypeInfoBase.Serialization.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Confluent.Models +{ + [PersistableModelProxy(typeof(UnknownConnectorServiceTypeInfoBase))] + public partial class ConnectorServiceTypeInfoBase : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ConnectorServiceTypeInfoBase)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("connectorServiceType"u8); + writer.WriteStringValue(ConnectorServiceType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ConnectorServiceTypeInfoBase 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(ConnectorServiceTypeInfoBase)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectorServiceTypeInfoBase(document.RootElement, options); + } + + internal static ConnectorServiceTypeInfoBase DeserializeConnectorServiceTypeInfoBase(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("connectorServiceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureBlobStorageSinkConnector": return AzureBlobStorageSinkConnectorServiceInfo.DeserializeAzureBlobStorageSinkConnectorServiceInfo(element, options); + case "AzureBlobStorageSourceConnector": return AzureBlobStorageSourceConnectorServiceInfo.DeserializeAzureBlobStorageSourceConnectorServiceInfo(element, options); + case "AzureCosmosDBSinkConnector": return AzureCosmosDBSinkConnectorServiceInfo.DeserializeAzureCosmosDBSinkConnectorServiceInfo(element, options); + case "AzureCosmosDBSourceConnector": return AzureCosmosDBSourceConnectorServiceInfo.DeserializeAzureCosmosDBSourceConnectorServiceInfo(element, options); + case "AzureSynapseAnalyticsSinkConnector": return AzureSynapseAnalyticsSinkConnectorServiceInfo.DeserializeAzureSynapseAnalyticsSinkConnectorServiceInfo(element, options); + } + } + return UnknownConnectorServiceTypeInfoBase.DeserializeUnknownConnectorServiceTypeInfoBase(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ConnectorServiceTypeInfoBase)} does not support writing '{options.Format}' format."); + } + } + + ConnectorServiceTypeInfoBase 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 DeserializeConnectorServiceTypeInfoBase(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectorServiceTypeInfoBase)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorServiceTypeInfoBase.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorServiceTypeInfoBase.cs new file mode 100644 index 000000000000..2b594f3be837 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorServiceTypeInfoBase.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// + /// The connector service type info + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + public abstract partial class ConnectorServiceTypeInfoBase + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected ConnectorServiceTypeInfoBase() + { + } + + /// Initializes a new instance of . + /// The connector service type. + /// Keeps track of any properties unknown to the library. + internal ConnectorServiceTypeInfoBase(ConnectorServiceType connectorServiceType, IDictionary serializedAdditionalRawData) + { + ConnectorServiceType = connectorServiceType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The connector service type. + internal ConnectorServiceType ConnectorServiceType { get; set; } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorStatus.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorStatus.cs new file mode 100644 index 000000000000..327664c13720 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorStatus.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// Connector Status. + public readonly partial struct ConnectorStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ConnectorStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ProvisioningValue = "PROVISIONING"; + private const string RunningValue = "RUNNING"; + private const string PausedValue = "PAUSED"; + private const string FailedValue = "FAILED"; + + /// PROVISIONING. + public static ConnectorStatus Provisioning { get; } = new ConnectorStatus(ProvisioningValue); + /// RUNNING. + public static ConnectorStatus Running { get; } = new ConnectorStatus(RunningValue); + /// PAUSED. + public static ConnectorStatus Paused { get; } = new ConnectorStatus(PausedValue); + /// FAILED. + public static ConnectorStatus Failed { get; } = new ConnectorStatus(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(ConnectorStatus left, ConnectorStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ConnectorStatus left, ConnectorStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ConnectorStatus(string value) => new ConnectorStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConnectorStatus other && Equals(other); + /// + public bool Equals(ConnectorStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorType.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorType.cs new file mode 100644 index 000000000000..9da20526c7f4 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ConnectorType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// Connector Type. + public readonly partial struct ConnectorType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ConnectorType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SinkValue = "SINK"; + private const string SourceValue = "SOURCE"; + + /// SINK. + public static ConnectorType Sink { get; } = new ConnectorType(SinkValue); + /// SOURCE. + public static ConnectorType Source { get; } = new ConnectorType(SourceValue); + /// Determines if two values are the same. + public static bool operator ==(ConnectorType left, ConnectorType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ConnectorType left, ConnectorType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ConnectorType(string value) => new ConnectorType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConnectorType other && Equals(other); + /// + public bool Equals(ConnectorType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/DataFormatType.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/DataFormatType.cs new file mode 100644 index 000000000000..fca503142e72 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/DataFormatType.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// Data Format Type. + public readonly partial struct DataFormatType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataFormatType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AvroValue = "AVRO"; + private const string JsonValue = "JSON"; + private const string StringValue = "STRING"; + private const string BytesValue = "BYTES"; + private const string ProtobufValue = "PROTOBUF"; + + /// AVRO. + public static DataFormatType Avro { get; } = new DataFormatType(AvroValue); + /// JSON. + public static DataFormatType Json { get; } = new DataFormatType(JsonValue); + /// STRING. + public static DataFormatType String { get; } = new DataFormatType(StringValue); + /// BYTES. + public static DataFormatType Bytes { get; } = new DataFormatType(BytesValue); + /// PROTOBUF. + public static DataFormatType Protobuf { get; } = new DataFormatType(ProtobufValue); + /// Determines if two values are the same. + public static bool operator ==(DataFormatType left, DataFormatType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataFormatType left, DataFormatType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataFormatType(string value) => new DataFormatType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataFormatType other && Equals(other); + /// + public bool Equals(DataFormatType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/GetEnvironmentsResponse.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/GetEnvironmentsResponse.Serialization.cs index c43e71c3a926..ea28364f8226 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/GetEnvironmentsResponse.Serialization.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/GetEnvironmentsResponse.Serialization.cs @@ -86,7 +86,7 @@ internal static GetEnvironmentsResponse DeserializeGetEnvironmentsResponse(JsonE { return null; } - IReadOnlyList value = default; + IReadOnlyList value = default; string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -98,10 +98,10 @@ internal static GetEnvironmentsResponse DeserializeGetEnvironmentsResponse(JsonE { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(SCEnvironmentRecord.DeserializeSCEnvironmentRecord(item, options)); + array.Add(SCEnvironmentRecordData.DeserializeSCEnvironmentRecordData(item, options)); } value = array; continue; @@ -117,7 +117,7 @@ internal static GetEnvironmentsResponse DeserializeGetEnvironmentsResponse(JsonE } } serializedAdditionalRawData = rawDataDictionary; - return new GetEnvironmentsResponse(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new GetEnvironmentsResponse(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/GetEnvironmentsResponse.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/GetEnvironmentsResponse.cs index 1bdbe6d36225..065e97b0b27a 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/GetEnvironmentsResponse.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/GetEnvironmentsResponse.cs @@ -48,14 +48,14 @@ internal partial class GetEnvironmentsResponse /// Initializes a new instance of . internal GetEnvironmentsResponse() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of . /// List of environments in a confluent organization. /// URL to get the next set of environment records if there are any. /// Keeps track of any properties unknown to the library. - internal GetEnvironmentsResponse(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal GetEnvironmentsResponse(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; @@ -63,7 +63,7 @@ internal GetEnvironmentsResponse(IReadOnlyList value, strin } /// List of environments in a confluent organization. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// URL to get the next set of environment records if there are any. public string NextLink { get; } } diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureBlobStorageSinkConnectorInfo.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureBlobStorageSinkConnectorInfo.Serialization.cs new file mode 100644 index 000000000000..f9c642e283b3 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureBlobStorageSinkConnectorInfo.Serialization.cs @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Confluent.Models +{ + public partial class KafkaAzureBlobStorageSinkConnectorInfo : 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(KafkaAzureBlobStorageSinkConnectorInfo)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(AuthType)) + { + writer.WritePropertyName("authType"u8); + writer.WriteStringValue(AuthType.Value.ToString()); + } + if (Optional.IsDefined(InputFormat)) + { + writer.WritePropertyName("inputFormat"u8); + writer.WriteStringValue(InputFormat.Value.ToString()); + } + if (Optional.IsDefined(OutputFormat)) + { + writer.WritePropertyName("outputFormat"u8); + writer.WriteStringValue(OutputFormat.Value.ToString()); + } + if (Optional.IsDefined(ApiKey)) + { + writer.WritePropertyName("apiKey"u8); + writer.WriteStringValue(ApiKey); + } + if (Optional.IsDefined(ApiSecret)) + { + writer.WritePropertyName("apiSecret"u8); + writer.WriteStringValue(ApiSecret); + } + if (Optional.IsDefined(ServiceAccountId)) + { + writer.WritePropertyName("serviceAccountId"u8); + writer.WriteStringValue(ServiceAccountId); + } + if (Optional.IsCollectionDefined(Topics)) + { + writer.WritePropertyName("topics"u8); + writer.WriteStartArray(); + foreach (var item in Topics) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(TopicsDir)) + { + writer.WritePropertyName("topicsDir"u8); + writer.WriteStringValue(TopicsDir); + } + if (Optional.IsDefined(FlushSize)) + { + writer.WritePropertyName("flushSize"u8); + writer.WriteStringValue(FlushSize); + } + if (Optional.IsDefined(MaxTasks)) + { + writer.WritePropertyName("maxTasks"u8); + writer.WriteStringValue(MaxTasks); + } + if (Optional.IsDefined(TimeInterval)) + { + writer.WritePropertyName("timeInterval"u8); + writer.WriteStringValue(TimeInterval); + } + } + + KafkaAzureBlobStorageSinkConnectorInfo 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(KafkaAzureBlobStorageSinkConnectorInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeKafkaAzureBlobStorageSinkConnectorInfo(document.RootElement, options); + } + + internal static KafkaAzureBlobStorageSinkConnectorInfo DeserializeKafkaAzureBlobStorageSinkConnectorInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AuthType? authType = default; + DataFormatType? inputFormat = default; + DataFormatType? outputFormat = default; + string apiKey = default; + string apiSecret = default; + string serviceAccountId = default; + IList topics = default; + string topicsDir = default; + string flushSize = default; + string maxTasks = default; + string timeInterval = default; + PartnerConnectorType partnerConnectorType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("authType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authType = new AuthType(property.Value.GetString()); + continue; + } + if (property.NameEquals("inputFormat"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputFormat = new DataFormatType(property.Value.GetString()); + continue; + } + if (property.NameEquals("outputFormat"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputFormat = new DataFormatType(property.Value.GetString()); + continue; + } + if (property.NameEquals("apiKey"u8)) + { + apiKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("apiSecret"u8)) + { + apiSecret = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceAccountId"u8)) + { + serviceAccountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("topics"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + topics = array; + continue; + } + if (property.NameEquals("topicsDir"u8)) + { + topicsDir = property.Value.GetString(); + continue; + } + if (property.NameEquals("flushSize"u8)) + { + flushSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("maxTasks"u8)) + { + maxTasks = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeInterval"u8)) + { + timeInterval = property.Value.GetString(); + continue; + } + if (property.NameEquals("partnerConnectorType"u8)) + { + partnerConnectorType = new PartnerConnectorType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new KafkaAzureBlobStorageSinkConnectorInfo( + partnerConnectorType, + serializedAdditionalRawData, + authType, + inputFormat, + outputFormat, + apiKey, + apiSecret, + serviceAccountId, + topics ?? new ChangeTrackingList(), + topicsDir, + flushSize, + maxTasks, + timeInterval); + } + + 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(KafkaAzureBlobStorageSinkConnectorInfo)} does not support writing '{options.Format}' format."); + } + } + + KafkaAzureBlobStorageSinkConnectorInfo 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 DeserializeKafkaAzureBlobStorageSinkConnectorInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(KafkaAzureBlobStorageSinkConnectorInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureBlobStorageSinkConnectorInfo.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureBlobStorageSinkConnectorInfo.cs new file mode 100644 index 000000000000..6fb578d5c9ea --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureBlobStorageSinkConnectorInfo.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// The partner connector type is KafkaAzureBlobStorageSink. + public partial class KafkaAzureBlobStorageSinkConnectorInfo : PartnerInfoBase + { + /// Initializes a new instance of . + public KafkaAzureBlobStorageSinkConnectorInfo() + { + Topics = new ChangeTrackingList(); + PartnerConnectorType = PartnerConnectorType.KafkaAzureBlobStorageSink; + } + + /// Initializes a new instance of . + /// The partner connector type. + /// Keeps track of any properties unknown to the library. + /// Kafka Auth Type. + /// Kafka Input Data Format Type. + /// Kafka Output Data Format Type. + /// Kafka API Key. + /// Kafka API Key Secret. + /// Kafka Service Account Id. + /// Kafka topics list. + /// Kafka topics directory. + /// Flush size. + /// Maximum Tasks. + /// Time Interval. + internal KafkaAzureBlobStorageSinkConnectorInfo(PartnerConnectorType partnerConnectorType, IDictionary serializedAdditionalRawData, AuthType? authType, DataFormatType? inputFormat, DataFormatType? outputFormat, string apiKey, string apiSecret, string serviceAccountId, IList topics, string topicsDir, string flushSize, string maxTasks, string timeInterval) : base(partnerConnectorType, serializedAdditionalRawData) + { + AuthType = authType; + InputFormat = inputFormat; + OutputFormat = outputFormat; + ApiKey = apiKey; + ApiSecret = apiSecret; + ServiceAccountId = serviceAccountId; + Topics = topics; + TopicsDir = topicsDir; + FlushSize = flushSize; + MaxTasks = maxTasks; + TimeInterval = timeInterval; + PartnerConnectorType = partnerConnectorType; + } + + /// Kafka Auth Type. + public AuthType? AuthType { get; set; } + /// Kafka Input Data Format Type. + public DataFormatType? InputFormat { get; set; } + /// Kafka Output Data Format Type. + public DataFormatType? OutputFormat { get; set; } + /// Kafka API Key. + public string ApiKey { get; set; } + /// Kafka API Key Secret. + public string ApiSecret { get; set; } + /// Kafka Service Account Id. + public string ServiceAccountId { get; set; } + /// Kafka topics list. + public IList Topics { get; } + /// Kafka topics directory. + public string TopicsDir { get; set; } + /// Flush size. + public string FlushSize { get; set; } + /// Maximum Tasks. + public string MaxTasks { get; set; } + /// Time Interval. + public string TimeInterval { get; set; } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureBlobStorageSourceConnectorInfo.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureBlobStorageSourceConnectorInfo.Serialization.cs new file mode 100644 index 000000000000..9f3f0711cd4a --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureBlobStorageSourceConnectorInfo.Serialization.cs @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Confluent.Models +{ + public partial class KafkaAzureBlobStorageSourceConnectorInfo : 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(KafkaAzureBlobStorageSourceConnectorInfo)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(AuthType)) + { + writer.WritePropertyName("authType"u8); + writer.WriteStringValue(AuthType.Value.ToString()); + } + if (Optional.IsDefined(InputFormat)) + { + writer.WritePropertyName("inputFormat"u8); + writer.WriteStringValue(InputFormat.Value.ToString()); + } + if (Optional.IsDefined(OutputFormat)) + { + writer.WritePropertyName("outputFormat"u8); + writer.WriteStringValue(OutputFormat.Value.ToString()); + } + if (Optional.IsDefined(ApiKey)) + { + writer.WritePropertyName("apiKey"u8); + writer.WriteStringValue(ApiKey); + } + if (Optional.IsDefined(ApiSecret)) + { + writer.WritePropertyName("apiSecret"u8); + writer.WriteStringValue(ApiSecret); + } + if (Optional.IsDefined(ServiceAccountId)) + { + writer.WritePropertyName("serviceAccountId"u8); + writer.WriteStringValue(ServiceAccountId); + } + if (Optional.IsDefined(TopicRegex)) + { + writer.WritePropertyName("topicRegex"u8); + writer.WriteStringValue(TopicRegex); + } + if (Optional.IsDefined(TopicsDir)) + { + writer.WritePropertyName("topicsDir"u8); + writer.WriteStringValue(TopicsDir); + } + if (Optional.IsDefined(MaxTasks)) + { + writer.WritePropertyName("maxTasks"u8); + writer.WriteStringValue(MaxTasks); + } + } + + KafkaAzureBlobStorageSourceConnectorInfo 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(KafkaAzureBlobStorageSourceConnectorInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeKafkaAzureBlobStorageSourceConnectorInfo(document.RootElement, options); + } + + internal static KafkaAzureBlobStorageSourceConnectorInfo DeserializeKafkaAzureBlobStorageSourceConnectorInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AuthType? authType = default; + DataFormatType? inputFormat = default; + DataFormatType? outputFormat = default; + string apiKey = default; + string apiSecret = default; + string serviceAccountId = default; + string topicRegex = default; + string topicsDir = default; + string maxTasks = default; + PartnerConnectorType partnerConnectorType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("authType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authType = new AuthType(property.Value.GetString()); + continue; + } + if (property.NameEquals("inputFormat"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputFormat = new DataFormatType(property.Value.GetString()); + continue; + } + if (property.NameEquals("outputFormat"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputFormat = new DataFormatType(property.Value.GetString()); + continue; + } + if (property.NameEquals("apiKey"u8)) + { + apiKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("apiSecret"u8)) + { + apiSecret = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceAccountId"u8)) + { + serviceAccountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("topicRegex"u8)) + { + topicRegex = property.Value.GetString(); + continue; + } + if (property.NameEquals("topicsDir"u8)) + { + topicsDir = property.Value.GetString(); + continue; + } + if (property.NameEquals("maxTasks"u8)) + { + maxTasks = property.Value.GetString(); + continue; + } + if (property.NameEquals("partnerConnectorType"u8)) + { + partnerConnectorType = new PartnerConnectorType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new KafkaAzureBlobStorageSourceConnectorInfo( + partnerConnectorType, + serializedAdditionalRawData, + authType, + inputFormat, + outputFormat, + apiKey, + apiSecret, + serviceAccountId, + topicRegex, + topicsDir, + maxTasks); + } + + 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(KafkaAzureBlobStorageSourceConnectorInfo)} does not support writing '{options.Format}' format."); + } + } + + KafkaAzureBlobStorageSourceConnectorInfo 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 DeserializeKafkaAzureBlobStorageSourceConnectorInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(KafkaAzureBlobStorageSourceConnectorInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureBlobStorageSourceConnectorInfo.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureBlobStorageSourceConnectorInfo.cs new file mode 100644 index 000000000000..6c2948eabed1 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureBlobStorageSourceConnectorInfo.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// The partner connector type is KafkaAzureBlobStorageSource. + public partial class KafkaAzureBlobStorageSourceConnectorInfo : PartnerInfoBase + { + /// Initializes a new instance of . + public KafkaAzureBlobStorageSourceConnectorInfo() + { + PartnerConnectorType = PartnerConnectorType.KafkaAzureBlobStorageSource; + } + + /// Initializes a new instance of . + /// The partner connector type. + /// Keeps track of any properties unknown to the library. + /// Kafka Auth Type. + /// Kafka Input Data Format Type. + /// Kafka Output Data Format Type. + /// Kafka API Key. + /// Kafka API Secret. + /// Kafka Service Account Id. + /// Kafka topics Regex pattern. + /// Kafka topics directory. + /// Maximum Tasks. + internal KafkaAzureBlobStorageSourceConnectorInfo(PartnerConnectorType partnerConnectorType, IDictionary serializedAdditionalRawData, AuthType? authType, DataFormatType? inputFormat, DataFormatType? outputFormat, string apiKey, string apiSecret, string serviceAccountId, string topicRegex, string topicsDir, string maxTasks) : base(partnerConnectorType, serializedAdditionalRawData) + { + AuthType = authType; + InputFormat = inputFormat; + OutputFormat = outputFormat; + ApiKey = apiKey; + ApiSecret = apiSecret; + ServiceAccountId = serviceAccountId; + TopicRegex = topicRegex; + TopicsDir = topicsDir; + MaxTasks = maxTasks; + PartnerConnectorType = partnerConnectorType; + } + + /// Kafka Auth Type. + public AuthType? AuthType { get; set; } + /// Kafka Input Data Format Type. + public DataFormatType? InputFormat { get; set; } + /// Kafka Output Data Format Type. + public DataFormatType? OutputFormat { get; set; } + /// Kafka API Key. + public string ApiKey { get; set; } + /// Kafka API Secret. + public string ApiSecret { get; set; } + /// Kafka Service Account Id. + public string ServiceAccountId { get; set; } + /// Kafka topics Regex pattern. + public string TopicRegex { get; set; } + /// Kafka topics directory. + public string TopicsDir { get; set; } + /// Maximum Tasks. + public string MaxTasks { get; set; } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureCosmosDBSinkConnectorInfo.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureCosmosDBSinkConnectorInfo.Serialization.cs new file mode 100644 index 000000000000..1530b7a05784 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureCosmosDBSinkConnectorInfo.Serialization.cs @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Confluent.Models +{ + public partial class KafkaAzureCosmosDBSinkConnectorInfo : 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(KafkaAzureCosmosDBSinkConnectorInfo)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(AuthType)) + { + writer.WritePropertyName("authType"u8); + writer.WriteStringValue(AuthType.Value.ToString()); + } + if (Optional.IsDefined(InputFormat)) + { + writer.WritePropertyName("inputFormat"u8); + writer.WriteStringValue(InputFormat.Value.ToString()); + } + if (Optional.IsDefined(OutputFormat)) + { + writer.WritePropertyName("outputFormat"u8); + writer.WriteStringValue(OutputFormat.Value.ToString()); + } + if (Optional.IsDefined(ApiKey)) + { + writer.WritePropertyName("apiKey"u8); + writer.WriteStringValue(ApiKey); + } + if (Optional.IsDefined(ApiSecret)) + { + writer.WritePropertyName("apiSecret"u8); + writer.WriteStringValue(ApiSecret); + } + if (Optional.IsDefined(ServiceAccountId)) + { + writer.WritePropertyName("serviceAccountId"u8); + writer.WriteStringValue(ServiceAccountId); + } + if (Optional.IsCollectionDefined(Topics)) + { + writer.WritePropertyName("topics"u8); + writer.WriteStartArray(); + foreach (var item in Topics) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(TopicsDir)) + { + writer.WritePropertyName("topicsDir"u8); + writer.WriteStringValue(TopicsDir); + } + if (Optional.IsDefined(FlushSize)) + { + writer.WritePropertyName("flushSize"u8); + writer.WriteStringValue(FlushSize); + } + if (Optional.IsDefined(MaxTasks)) + { + writer.WritePropertyName("maxTasks"u8); + writer.WriteStringValue(MaxTasks); + } + if (Optional.IsDefined(TimeInterval)) + { + writer.WritePropertyName("timeInterval"u8); + writer.WriteStringValue(TimeInterval); + } + } + + KafkaAzureCosmosDBSinkConnectorInfo 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(KafkaAzureCosmosDBSinkConnectorInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeKafkaAzureCosmosDBSinkConnectorInfo(document.RootElement, options); + } + + internal static KafkaAzureCosmosDBSinkConnectorInfo DeserializeKafkaAzureCosmosDBSinkConnectorInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AuthType? authType = default; + DataFormatType? inputFormat = default; + DataFormatType? outputFormat = default; + string apiKey = default; + string apiSecret = default; + string serviceAccountId = default; + IList topics = default; + string topicsDir = default; + string flushSize = default; + string maxTasks = default; + string timeInterval = default; + PartnerConnectorType partnerConnectorType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("authType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authType = new AuthType(property.Value.GetString()); + continue; + } + if (property.NameEquals("inputFormat"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputFormat = new DataFormatType(property.Value.GetString()); + continue; + } + if (property.NameEquals("outputFormat"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputFormat = new DataFormatType(property.Value.GetString()); + continue; + } + if (property.NameEquals("apiKey"u8)) + { + apiKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("apiSecret"u8)) + { + apiSecret = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceAccountId"u8)) + { + serviceAccountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("topics"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + topics = array; + continue; + } + if (property.NameEquals("topicsDir"u8)) + { + topicsDir = property.Value.GetString(); + continue; + } + if (property.NameEquals("flushSize"u8)) + { + flushSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("maxTasks"u8)) + { + maxTasks = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeInterval"u8)) + { + timeInterval = property.Value.GetString(); + continue; + } + if (property.NameEquals("partnerConnectorType"u8)) + { + partnerConnectorType = new PartnerConnectorType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new KafkaAzureCosmosDBSinkConnectorInfo( + partnerConnectorType, + serializedAdditionalRawData, + authType, + inputFormat, + outputFormat, + apiKey, + apiSecret, + serviceAccountId, + topics ?? new ChangeTrackingList(), + topicsDir, + flushSize, + maxTasks, + timeInterval); + } + + 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(KafkaAzureCosmosDBSinkConnectorInfo)} does not support writing '{options.Format}' format."); + } + } + + KafkaAzureCosmosDBSinkConnectorInfo 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 DeserializeKafkaAzureCosmosDBSinkConnectorInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(KafkaAzureCosmosDBSinkConnectorInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureCosmosDBSinkConnectorInfo.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureCosmosDBSinkConnectorInfo.cs new file mode 100644 index 000000000000..a379c9567b64 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureCosmosDBSinkConnectorInfo.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// The partner connector type is KafkaAzureCosmosDBSink. + public partial class KafkaAzureCosmosDBSinkConnectorInfo : PartnerInfoBase + { + /// Initializes a new instance of . + public KafkaAzureCosmosDBSinkConnectorInfo() + { + Topics = new ChangeTrackingList(); + PartnerConnectorType = PartnerConnectorType.KafkaAzureCosmosDBSink; + } + + /// Initializes a new instance of . + /// The partner connector type. + /// Keeps track of any properties unknown to the library. + /// Kafka Auth Type. + /// Kafka Input Data Format Type. + /// Kafka Output Data Format Type. + /// Kafka API Key. + /// Kafka API Key Secret. + /// Kafka Service Account Id. + /// Kafka topics list. + /// Kafka topics directory. + /// Flush size. + /// Maximum Tasks. + /// Time Interval. + internal KafkaAzureCosmosDBSinkConnectorInfo(PartnerConnectorType partnerConnectorType, IDictionary serializedAdditionalRawData, AuthType? authType, DataFormatType? inputFormat, DataFormatType? outputFormat, string apiKey, string apiSecret, string serviceAccountId, IList topics, string topicsDir, string flushSize, string maxTasks, string timeInterval) : base(partnerConnectorType, serializedAdditionalRawData) + { + AuthType = authType; + InputFormat = inputFormat; + OutputFormat = outputFormat; + ApiKey = apiKey; + ApiSecret = apiSecret; + ServiceAccountId = serviceAccountId; + Topics = topics; + TopicsDir = topicsDir; + FlushSize = flushSize; + MaxTasks = maxTasks; + TimeInterval = timeInterval; + PartnerConnectorType = partnerConnectorType; + } + + /// Kafka Auth Type. + public AuthType? AuthType { get; set; } + /// Kafka Input Data Format Type. + public DataFormatType? InputFormat { get; set; } + /// Kafka Output Data Format Type. + public DataFormatType? OutputFormat { get; set; } + /// Kafka API Key. + public string ApiKey { get; set; } + /// Kafka API Key Secret. + public string ApiSecret { get; set; } + /// Kafka Service Account Id. + public string ServiceAccountId { get; set; } + /// Kafka topics list. + public IList Topics { get; } + /// Kafka topics directory. + public string TopicsDir { get; set; } + /// Flush size. + public string FlushSize { get; set; } + /// Maximum Tasks. + public string MaxTasks { get; set; } + /// Time Interval. + public string TimeInterval { get; set; } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureCosmosDBSourceConnectorInfo.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureCosmosDBSourceConnectorInfo.Serialization.cs new file mode 100644 index 000000000000..6768b14948ca --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureCosmosDBSourceConnectorInfo.Serialization.cs @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Confluent.Models +{ + public partial class KafkaAzureCosmosDBSourceConnectorInfo : 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(KafkaAzureCosmosDBSourceConnectorInfo)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(AuthType)) + { + writer.WritePropertyName("authType"u8); + writer.WriteStringValue(AuthType.Value.ToString()); + } + if (Optional.IsDefined(InputFormat)) + { + writer.WritePropertyName("inputFormat"u8); + writer.WriteStringValue(InputFormat.Value.ToString()); + } + if (Optional.IsDefined(OutputFormat)) + { + writer.WritePropertyName("outputFormat"u8); + writer.WriteStringValue(OutputFormat.Value.ToString()); + } + if (Optional.IsDefined(ApiKey)) + { + writer.WritePropertyName("apiKey"u8); + writer.WriteStringValue(ApiKey); + } + if (Optional.IsDefined(ApiSecret)) + { + writer.WritePropertyName("apiSecret"u8); + writer.WriteStringValue(ApiSecret); + } + if (Optional.IsDefined(ServiceAccountId)) + { + writer.WritePropertyName("serviceAccountId"u8); + writer.WriteStringValue(ServiceAccountId); + } + if (Optional.IsDefined(TopicRegex)) + { + writer.WritePropertyName("topicRegex"u8); + writer.WriteStringValue(TopicRegex); + } + if (Optional.IsDefined(TopicsDir)) + { + writer.WritePropertyName("topicsDir"u8); + writer.WriteStringValue(TopicsDir); + } + if (Optional.IsDefined(MaxTasks)) + { + writer.WritePropertyName("maxTasks"u8); + writer.WriteStringValue(MaxTasks); + } + } + + KafkaAzureCosmosDBSourceConnectorInfo 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(KafkaAzureCosmosDBSourceConnectorInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeKafkaAzureCosmosDBSourceConnectorInfo(document.RootElement, options); + } + + internal static KafkaAzureCosmosDBSourceConnectorInfo DeserializeKafkaAzureCosmosDBSourceConnectorInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AuthType? authType = default; + DataFormatType? inputFormat = default; + DataFormatType? outputFormat = default; + string apiKey = default; + string apiSecret = default; + string serviceAccountId = default; + string topicRegex = default; + string topicsDir = default; + string maxTasks = default; + PartnerConnectorType partnerConnectorType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("authType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authType = new AuthType(property.Value.GetString()); + continue; + } + if (property.NameEquals("inputFormat"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputFormat = new DataFormatType(property.Value.GetString()); + continue; + } + if (property.NameEquals("outputFormat"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputFormat = new DataFormatType(property.Value.GetString()); + continue; + } + if (property.NameEquals("apiKey"u8)) + { + apiKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("apiSecret"u8)) + { + apiSecret = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceAccountId"u8)) + { + serviceAccountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("topicRegex"u8)) + { + topicRegex = property.Value.GetString(); + continue; + } + if (property.NameEquals("topicsDir"u8)) + { + topicsDir = property.Value.GetString(); + continue; + } + if (property.NameEquals("maxTasks"u8)) + { + maxTasks = property.Value.GetString(); + continue; + } + if (property.NameEquals("partnerConnectorType"u8)) + { + partnerConnectorType = new PartnerConnectorType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new KafkaAzureCosmosDBSourceConnectorInfo( + partnerConnectorType, + serializedAdditionalRawData, + authType, + inputFormat, + outputFormat, + apiKey, + apiSecret, + serviceAccountId, + topicRegex, + topicsDir, + maxTasks); + } + + 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(KafkaAzureCosmosDBSourceConnectorInfo)} does not support writing '{options.Format}' format."); + } + } + + KafkaAzureCosmosDBSourceConnectorInfo 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 DeserializeKafkaAzureCosmosDBSourceConnectorInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(KafkaAzureCosmosDBSourceConnectorInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureCosmosDBSourceConnectorInfo.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureCosmosDBSourceConnectorInfo.cs new file mode 100644 index 000000000000..34d9fb5c52cf --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureCosmosDBSourceConnectorInfo.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// The partner connector type is KafkaAzureCosmosDBSource. + public partial class KafkaAzureCosmosDBSourceConnectorInfo : PartnerInfoBase + { + /// Initializes a new instance of . + public KafkaAzureCosmosDBSourceConnectorInfo() + { + PartnerConnectorType = PartnerConnectorType.KafkaAzureCosmosDBSource; + } + + /// Initializes a new instance of . + /// The partner connector type. + /// Keeps track of any properties unknown to the library. + /// Kafka Auth Type. + /// Kafka Input Data Format Type. + /// Kafka Output Data Format Type. + /// Kafka API Key. + /// Kafka API Secret. + /// Kafka Service Account Id. + /// Kafka topics Regex pattern. + /// Kafka topics directory. + /// Maximum Tasks. + internal KafkaAzureCosmosDBSourceConnectorInfo(PartnerConnectorType partnerConnectorType, IDictionary serializedAdditionalRawData, AuthType? authType, DataFormatType? inputFormat, DataFormatType? outputFormat, string apiKey, string apiSecret, string serviceAccountId, string topicRegex, string topicsDir, string maxTasks) : base(partnerConnectorType, serializedAdditionalRawData) + { + AuthType = authType; + InputFormat = inputFormat; + OutputFormat = outputFormat; + ApiKey = apiKey; + ApiSecret = apiSecret; + ServiceAccountId = serviceAccountId; + TopicRegex = topicRegex; + TopicsDir = topicsDir; + MaxTasks = maxTasks; + PartnerConnectorType = partnerConnectorType; + } + + /// Kafka Auth Type. + public AuthType? AuthType { get; set; } + /// Kafka Input Data Format Type. + public DataFormatType? InputFormat { get; set; } + /// Kafka Output Data Format Type. + public DataFormatType? OutputFormat { get; set; } + /// Kafka API Key. + public string ApiKey { get; set; } + /// Kafka API Secret. + public string ApiSecret { get; set; } + /// Kafka Service Account Id. + public string ServiceAccountId { get; set; } + /// Kafka topics Regex pattern. + public string TopicRegex { get; set; } + /// Kafka topics directory. + public string TopicsDir { get; set; } + /// Maximum Tasks. + public string MaxTasks { get; set; } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureSynapseAnalyticsSinkConnectorInfo.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureSynapseAnalyticsSinkConnectorInfo.Serialization.cs new file mode 100644 index 000000000000..62ae536f2919 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureSynapseAnalyticsSinkConnectorInfo.Serialization.cs @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Confluent.Models +{ + public partial class KafkaAzureSynapseAnalyticsSinkConnectorInfo : 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(KafkaAzureSynapseAnalyticsSinkConnectorInfo)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(AuthType)) + { + writer.WritePropertyName("authType"u8); + writer.WriteStringValue(AuthType.Value.ToString()); + } + if (Optional.IsDefined(InputFormat)) + { + writer.WritePropertyName("inputFormat"u8); + writer.WriteStringValue(InputFormat.Value.ToString()); + } + if (Optional.IsDefined(OutputFormat)) + { + writer.WritePropertyName("outputFormat"u8); + writer.WriteStringValue(OutputFormat.Value.ToString()); + } + if (Optional.IsDefined(ApiKey)) + { + writer.WritePropertyName("apiKey"u8); + writer.WriteStringValue(ApiKey); + } + if (Optional.IsDefined(ApiSecret)) + { + writer.WritePropertyName("apiSecret"u8); + writer.WriteStringValue(ApiSecret); + } + if (Optional.IsDefined(ServiceAccountId)) + { + writer.WritePropertyName("serviceAccountId"u8); + writer.WriteStringValue(ServiceAccountId); + } + if (Optional.IsCollectionDefined(Topics)) + { + writer.WritePropertyName("topics"u8); + writer.WriteStartArray(); + foreach (var item in Topics) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(TopicsDir)) + { + writer.WritePropertyName("topicsDir"u8); + writer.WriteStringValue(TopicsDir); + } + if (Optional.IsDefined(FlushSize)) + { + writer.WritePropertyName("flushSize"u8); + writer.WriteStringValue(FlushSize); + } + if (Optional.IsDefined(MaxTasks)) + { + writer.WritePropertyName("maxTasks"u8); + writer.WriteStringValue(MaxTasks); + } + if (Optional.IsDefined(TimeInterval)) + { + writer.WritePropertyName("timeInterval"u8); + writer.WriteStringValue(TimeInterval); + } + } + + KafkaAzureSynapseAnalyticsSinkConnectorInfo 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(KafkaAzureSynapseAnalyticsSinkConnectorInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeKafkaAzureSynapseAnalyticsSinkConnectorInfo(document.RootElement, options); + } + + internal static KafkaAzureSynapseAnalyticsSinkConnectorInfo DeserializeKafkaAzureSynapseAnalyticsSinkConnectorInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AuthType? authType = default; + DataFormatType? inputFormat = default; + DataFormatType? outputFormat = default; + string apiKey = default; + string apiSecret = default; + string serviceAccountId = default; + IList topics = default; + string topicsDir = default; + string flushSize = default; + string maxTasks = default; + string timeInterval = default; + PartnerConnectorType partnerConnectorType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("authType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authType = new AuthType(property.Value.GetString()); + continue; + } + if (property.NameEquals("inputFormat"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputFormat = new DataFormatType(property.Value.GetString()); + continue; + } + if (property.NameEquals("outputFormat"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputFormat = new DataFormatType(property.Value.GetString()); + continue; + } + if (property.NameEquals("apiKey"u8)) + { + apiKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("apiSecret"u8)) + { + apiSecret = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceAccountId"u8)) + { + serviceAccountId = property.Value.GetString(); + continue; + } + if (property.NameEquals("topics"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + topics = array; + continue; + } + if (property.NameEquals("topicsDir"u8)) + { + topicsDir = property.Value.GetString(); + continue; + } + if (property.NameEquals("flushSize"u8)) + { + flushSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("maxTasks"u8)) + { + maxTasks = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeInterval"u8)) + { + timeInterval = property.Value.GetString(); + continue; + } + if (property.NameEquals("partnerConnectorType"u8)) + { + partnerConnectorType = new PartnerConnectorType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new KafkaAzureSynapseAnalyticsSinkConnectorInfo( + partnerConnectorType, + serializedAdditionalRawData, + authType, + inputFormat, + outputFormat, + apiKey, + apiSecret, + serviceAccountId, + topics ?? new ChangeTrackingList(), + topicsDir, + flushSize, + maxTasks, + timeInterval); + } + + 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(KafkaAzureSynapseAnalyticsSinkConnectorInfo)} does not support writing '{options.Format}' format."); + } + } + + KafkaAzureSynapseAnalyticsSinkConnectorInfo 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 DeserializeKafkaAzureSynapseAnalyticsSinkConnectorInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(KafkaAzureSynapseAnalyticsSinkConnectorInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureSynapseAnalyticsSinkConnectorInfo.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureSynapseAnalyticsSinkConnectorInfo.cs new file mode 100644 index 000000000000..088f9bcbc477 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/KafkaAzureSynapseAnalyticsSinkConnectorInfo.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// The partner connector type is KafkaAzureSynapseAnalyticsSink. + public partial class KafkaAzureSynapseAnalyticsSinkConnectorInfo : PartnerInfoBase + { + /// Initializes a new instance of . + public KafkaAzureSynapseAnalyticsSinkConnectorInfo() + { + Topics = new ChangeTrackingList(); + PartnerConnectorType = PartnerConnectorType.KafkaAzureSynapseAnalyticsSink; + } + + /// Initializes a new instance of . + /// The partner connector type. + /// Keeps track of any properties unknown to the library. + /// Kafka Auth Type. + /// Kafka Input Data Format Type. + /// Kafka Output Data Format Type. + /// Kafka API Key. + /// Kafka API Key Secret. + /// Kafka Service Account Id. + /// Kafka topics list. + /// Kafka topics directory. + /// Flush size. + /// Maximum Tasks. + /// Time Interval. + internal KafkaAzureSynapseAnalyticsSinkConnectorInfo(PartnerConnectorType partnerConnectorType, IDictionary serializedAdditionalRawData, AuthType? authType, DataFormatType? inputFormat, DataFormatType? outputFormat, string apiKey, string apiSecret, string serviceAccountId, IList topics, string topicsDir, string flushSize, string maxTasks, string timeInterval) : base(partnerConnectorType, serializedAdditionalRawData) + { + AuthType = authType; + InputFormat = inputFormat; + OutputFormat = outputFormat; + ApiKey = apiKey; + ApiSecret = apiSecret; + ServiceAccountId = serviceAccountId; + Topics = topics; + TopicsDir = topicsDir; + FlushSize = flushSize; + MaxTasks = maxTasks; + TimeInterval = timeInterval; + PartnerConnectorType = partnerConnectorType; + } + + /// Kafka Auth Type. + public AuthType? AuthType { get; set; } + /// Kafka Input Data Format Type. + public DataFormatType? InputFormat { get; set; } + /// Kafka Output Data Format Type. + public DataFormatType? OutputFormat { get; set; } + /// Kafka API Key. + public string ApiKey { get; set; } + /// Kafka API Key Secret. + public string ApiSecret { get; set; } + /// Kafka Service Account Id. + public string ServiceAccountId { get; set; } + /// Kafka topics list. + public IList Topics { get; } + /// Kafka topics directory. + public string TopicsDir { get; set; } + /// Flush size. + public string FlushSize { get; set; } + /// Maximum Tasks. + public string MaxTasks { get; set; } + /// Time Interval. + public string TimeInterval { get; set; } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ListClustersSuccessResponse.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ListClustersSuccessResponse.Serialization.cs index 0d32b05fa865..b2478ac128c6 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ListClustersSuccessResponse.Serialization.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ListClustersSuccessResponse.Serialization.cs @@ -86,7 +86,7 @@ internal static ListClustersSuccessResponse DeserializeListClustersSuccessRespon { return null; } - IReadOnlyList value = default; + IReadOnlyList value = default; string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -98,10 +98,10 @@ internal static ListClustersSuccessResponse DeserializeListClustersSuccessRespon { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(SCClusterRecord.DeserializeSCClusterRecord(item, options)); + array.Add(SCClusterRecordData.DeserializeSCClusterRecordData(item, options)); } value = array; continue; @@ -117,7 +117,7 @@ internal static ListClustersSuccessResponse DeserializeListClustersSuccessRespon } } serializedAdditionalRawData = rawDataDictionary; - return new ListClustersSuccessResponse(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ListClustersSuccessResponse(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ListClustersSuccessResponse.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ListClustersSuccessResponse.cs index f15756e85bc9..b8db480ca3de 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ListClustersSuccessResponse.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ListClustersSuccessResponse.cs @@ -48,14 +48,14 @@ internal partial class ListClustersSuccessResponse /// Initializes a new instance of . internal ListClustersSuccessResponse() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of . /// List of clusters in an environment of a confluent organization. /// URL to get the next set of cluster records if there are any. /// Keeps track of any properties unknown to the library. - internal ListClustersSuccessResponse(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ListClustersSuccessResponse(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; @@ -63,7 +63,7 @@ internal ListClustersSuccessResponse(IReadOnlyList value, strin } /// List of clusters in an environment of a confluent organization. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// URL to get the next set of cluster records if there are any. public string NextLink { get; } } diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ListConnectorsSuccessResponse.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ListConnectorsSuccessResponse.Serialization.cs new file mode 100644 index 000000000000..f422e3cad3b4 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ListConnectorsSuccessResponse.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Confluent.Models +{ + internal partial class ListConnectorsSuccessResponse : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ListConnectorsSuccessResponse)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ListConnectorsSuccessResponse 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(ListConnectorsSuccessResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeListConnectorsSuccessResponse(document.RootElement, options); + } + + internal static ListConnectorsSuccessResponse DeserializeListConnectorsSuccessResponse(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ConnectorResourceData.DeserializeConnectorResourceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ListConnectorsSuccessResponse(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ListConnectorsSuccessResponse)} does not support writing '{options.Format}' format."); + } + } + + ListConnectorsSuccessResponse 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 DeserializeListConnectorsSuccessResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ListConnectorsSuccessResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ListConnectorsSuccessResponse.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ListConnectorsSuccessResponse.cs new file mode 100644 index 000000000000..cbe7b7838dc8 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ListConnectorsSuccessResponse.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// Result of GET request to list connectors in the cluster of a confluent organization. + internal partial class ListConnectorsSuccessResponse + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ListConnectorsSuccessResponse() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// List of connectors in a cluster of a confluent organization. + /// URL to get the next set of connectors records if there are any. + /// Keeps track of any properties unknown to the library. + internal ListConnectorsSuccessResponse(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// List of connectors in a cluster of a confluent organization. + public IReadOnlyList Value { get; } + /// URL to get the next set of connectors records if there are any. + public string NextLink { get; } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ListTopicsSuccessResponse.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ListTopicsSuccessResponse.Serialization.cs new file mode 100644 index 000000000000..4d17986b30d1 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ListTopicsSuccessResponse.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Confluent.Models +{ + internal partial class ListTopicsSuccessResponse : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ListTopicsSuccessResponse)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + ListTopicsSuccessResponse 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(ListTopicsSuccessResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeListTopicsSuccessResponse(document.RootElement, options); + } + + internal static ListTopicsSuccessResponse DeserializeListTopicsSuccessResponse(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(TopicRecordData.DeserializeTopicRecordData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ListTopicsSuccessResponse(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ListTopicsSuccessResponse)} does not support writing '{options.Format}' format."); + } + } + + ListTopicsSuccessResponse 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 DeserializeListTopicsSuccessResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ListTopicsSuccessResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ListTopicsSuccessResponse.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ListTopicsSuccessResponse.cs new file mode 100644 index 000000000000..4a116fbc2aca --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/ListTopicsSuccessResponse.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// Result of GET request to list topics in the cluster of a confluent organization. + internal partial class ListTopicsSuccessResponse + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ListTopicsSuccessResponse() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// List of topics in a cluster of a confluent organization. + /// URL to get the next set of topics records if there are any. + /// Keeps track of any properties unknown to the library. + internal ListTopicsSuccessResponse(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// List of topics in a cluster of a confluent organization. + public IReadOnlyList Value { get; } + /// URL to get the next set of topics records if there are any. + public string NextLink { get; } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/Package.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/Package.cs new file mode 100644 index 000000000000..3dad67d55bd6 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/Package.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// Stream Governance Package. Supported values are ESSENTIALS and ADVANCED. + public readonly partial struct Package : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Package(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EssentialsValue = "ESSENTIALS"; + private const string AdvancedValue = "ADVANCED"; + + /// ESSENTIALS. + public static Package Essentials { get; } = new Package(EssentialsValue); + /// ADVANCED. + public static Package Advanced { get; } = new Package(AdvancedValue); + /// Determines if two values are the same. + public static bool operator ==(Package left, Package right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Package left, Package right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator Package(string value) => new Package(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Package other && Equals(other); + /// + public bool Equals(Package other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/PartnerConnectorType.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/PartnerConnectorType.cs new file mode 100644 index 000000000000..12afda048b65 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/PartnerConnectorType.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// Partner Connector type. + internal readonly partial struct PartnerConnectorType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PartnerConnectorType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string KafkaAzureBlobStorageSourceValue = "KafkaAzureBlobStorageSource"; + private const string KafkaAzureBlobStorageSinkValue = "KafkaAzureBlobStorageSink"; + private const string KafkaAzureCosmosDBSourceValue = "KafkaAzureCosmosDBSource"; + private const string KafkaAzureCosmosDBSinkValue = "KafkaAzureCosmosDBSink"; + private const string KafkaAzureSynapseAnalyticsSinkValue = "KafkaAzureSynapseAnalyticsSink"; + + /// KafkaAzureBlobStorageSource. + public static PartnerConnectorType KafkaAzureBlobStorageSource { get; } = new PartnerConnectorType(KafkaAzureBlobStorageSourceValue); + /// KafkaAzureBlobStorageSink. + public static PartnerConnectorType KafkaAzureBlobStorageSink { get; } = new PartnerConnectorType(KafkaAzureBlobStorageSinkValue); + /// KafkaAzureCosmosDBSource. + public static PartnerConnectorType KafkaAzureCosmosDBSource { get; } = new PartnerConnectorType(KafkaAzureCosmosDBSourceValue); + /// KafkaAzureCosmosDBSink. + public static PartnerConnectorType KafkaAzureCosmosDBSink { get; } = new PartnerConnectorType(KafkaAzureCosmosDBSinkValue); + /// KafkaAzureSynapseAnalyticsSink. + public static PartnerConnectorType KafkaAzureSynapseAnalyticsSink { get; } = new PartnerConnectorType(KafkaAzureSynapseAnalyticsSinkValue); + /// Determines if two values are the same. + public static bool operator ==(PartnerConnectorType left, PartnerConnectorType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PartnerConnectorType left, PartnerConnectorType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PartnerConnectorType(string value) => new PartnerConnectorType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PartnerConnectorType other && Equals(other); + /// + public bool Equals(PartnerConnectorType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/PartnerInfoBase.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/PartnerInfoBase.Serialization.cs new file mode 100644 index 000000000000..97beb41b3a64 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/PartnerInfoBase.Serialization.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Confluent.Models +{ + [PersistableModelProxy(typeof(UnknownPartnerInfoBase))] + public partial class PartnerInfoBase : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PartnerInfoBase)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("partnerConnectorType"u8); + writer.WriteStringValue(PartnerConnectorType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + PartnerInfoBase 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(PartnerInfoBase)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePartnerInfoBase(document.RootElement, options); + } + + internal static PartnerInfoBase DeserializePartnerInfoBase(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("partnerConnectorType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "KafkaAzureBlobStorageSink": return KafkaAzureBlobStorageSinkConnectorInfo.DeserializeKafkaAzureBlobStorageSinkConnectorInfo(element, options); + case "KafkaAzureBlobStorageSource": return KafkaAzureBlobStorageSourceConnectorInfo.DeserializeKafkaAzureBlobStorageSourceConnectorInfo(element, options); + case "KafkaAzureCosmosDBSink": return KafkaAzureCosmosDBSinkConnectorInfo.DeserializeKafkaAzureCosmosDBSinkConnectorInfo(element, options); + case "KafkaAzureCosmosDBSource": return KafkaAzureCosmosDBSourceConnectorInfo.DeserializeKafkaAzureCosmosDBSourceConnectorInfo(element, options); + case "KafkaAzureSynapseAnalyticsSink": return KafkaAzureSynapseAnalyticsSinkConnectorInfo.DeserializeKafkaAzureSynapseAnalyticsSinkConnectorInfo(element, options); + } + } + return UnknownPartnerInfoBase.DeserializeUnknownPartnerInfoBase(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(PartnerInfoBase)} does not support writing '{options.Format}' format."); + } + } + + PartnerInfoBase 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 DeserializePartnerInfoBase(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PartnerInfoBase)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/PartnerInfoBase.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/PartnerInfoBase.cs new file mode 100644 index 000000000000..d0e7552d1b7c --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/PartnerInfoBase.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// + /// The partner info base + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + public abstract partial class PartnerInfoBase + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected PartnerInfoBase() + { + } + + /// Initializes a new instance of . + /// The partner connector type. + /// Keeps track of any properties unknown to the library. + internal PartnerInfoBase(PartnerConnectorType partnerConnectorType, IDictionary serializedAdditionalRawData) + { + PartnerConnectorType = partnerConnectorType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The partner connector type. + internal PartnerConnectorType PartnerConnectorType { get; set; } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterByokEntity.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterByokEntity.cs index fb8f76c92877..a567966af7b9 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterByokEntity.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterByokEntity.cs @@ -46,7 +46,7 @@ public partial class SCClusterByokEntity private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal SCClusterByokEntity() + public SCClusterByokEntity() { } @@ -64,10 +64,10 @@ internal SCClusterByokEntity(string id, string related, string resourceName, IDi } /// ID of the referred resource. - public string Id { get; } + public string Id { get; set; } /// API URL for accessing or modifying the referred object. - public string Related { get; } + public string Related { get; set; } /// CRN reference to the referred resource. - public string ResourceName { get; } + public string ResourceName { get; set; } } } diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterNetworkEnvironmentEntity.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterNetworkEnvironmentEntity.cs index 65a53420be4a..10657ff1cb9c 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterNetworkEnvironmentEntity.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterNetworkEnvironmentEntity.cs @@ -46,7 +46,7 @@ public partial class SCClusterNetworkEnvironmentEntity private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal SCClusterNetworkEnvironmentEntity() + public SCClusterNetworkEnvironmentEntity() { } @@ -66,12 +66,12 @@ internal SCClusterNetworkEnvironmentEntity(string id, string environment, string } /// ID of the referred resource. - public string Id { get; } + public string Id { get; set; } /// Environment of the referred resource. - public string Environment { get; } + public string Environment { get; set; } /// API URL for accessing or modifying the referred object. - public string Related { get; } + public string Related { get; set; } /// CRN reference to the referred resource. - public string ResourceName { get; } + public string ResourceName { get; set; } } } diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterSpecEntity.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterSpecEntity.Serialization.cs index 2172a6d11ce8..fdb0154064ae 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterSpecEntity.Serialization.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterSpecEntity.Serialization.cs @@ -54,6 +54,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("zone"u8); writer.WriteStringValue(Zone); } + if (Optional.IsDefined(Package)) + { + writer.WritePropertyName("package"u8); + writer.WriteStringValue(Package.Value.ToString()); + } if (Optional.IsDefined(Region)) { writer.WritePropertyName("region"u8); @@ -135,6 +140,7 @@ internal static SCClusterSpecEntity DeserializeSCClusterSpecEntity(JsonElement e string availability = default; string cloud = default; string zone = default; + Package? package = default; string region = default; string kafkaBootstrapEndpoint = default; string httpEndpoint = default; @@ -167,6 +173,15 @@ internal static SCClusterSpecEntity DeserializeSCClusterSpecEntity(JsonElement e zone = property.Value.GetString(); continue; } + if (property.NameEquals("package"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + package = new Package(property.Value.GetString()); + continue; + } if (property.NameEquals("region"u8)) { region = property.Value.GetString(); @@ -234,6 +249,7 @@ internal static SCClusterSpecEntity DeserializeSCClusterSpecEntity(JsonElement e availability, cloud, zone, + package, region, kafkaBootstrapEndpoint, httpEndpoint, diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterSpecEntity.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterSpecEntity.cs index 931e62521ff3..cb29b8ec7b28 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterSpecEntity.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterSpecEntity.cs @@ -46,7 +46,7 @@ public partial class SCClusterSpecEntity private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal SCClusterSpecEntity() + public SCClusterSpecEntity() { } @@ -55,6 +55,7 @@ internal SCClusterSpecEntity() /// The availability zone configuration of the cluster. /// The cloud service provider. /// type of zone availability. + /// Stream governance configuration. /// The cloud service provider region. /// The bootstrap endpoint used by Kafka clients to connect to the cluster. /// The cluster HTTP request URL. @@ -64,12 +65,13 @@ internal SCClusterSpecEntity() /// Specification of the cluster network. /// Specification of the cluster byok. /// Keeps track of any properties unknown to the library. - internal SCClusterSpecEntity(string name, string availability, string cloud, string zone, string region, string kafkaBootstrapEndpoint, string httpEndpoint, string apiEndpoint, ClusterConfigEntity config, SCClusterNetworkEnvironmentEntity environment, SCClusterNetworkEnvironmentEntity network, SCClusterByokEntity byok, IDictionary serializedAdditionalRawData) + internal SCClusterSpecEntity(string name, string availability, string cloud, string zone, Package? package, string region, string kafkaBootstrapEndpoint, string httpEndpoint, string apiEndpoint, ClusterConfigEntity config, SCClusterNetworkEnvironmentEntity environment, SCClusterNetworkEnvironmentEntity network, SCClusterByokEntity byok, IDictionary serializedAdditionalRawData) { Name = name; Availability = availability; Cloud = cloud; Zone = zone; + Package = package; Region = region; KafkaBootstrapEndpoint = kafkaBootstrapEndpoint; HttpEndpoint = httpEndpoint; @@ -82,34 +84,42 @@ internal SCClusterSpecEntity(string name, string availability, string cloud, str } /// The name of the cluster. - public string Name { get; } + public string Name { get; set; } /// The availability zone configuration of the cluster. - public string Availability { get; } + public string Availability { get; set; } /// The cloud service provider. - public string Cloud { get; } + public string Cloud { get; set; } /// type of zone availability. - public string Zone { get; } + public string Zone { get; set; } + /// Stream governance configuration. + public Package? Package { get; set; } /// The cloud service provider region. - public string Region { get; } + public string Region { get; set; } /// The bootstrap endpoint used by Kafka clients to connect to the cluster. - public string KafkaBootstrapEndpoint { get; } + public string KafkaBootstrapEndpoint { get; set; } /// The cluster HTTP request URL. - public string HttpEndpoint { get; } + public string HttpEndpoint { get; set; } /// The Kafka API cluster endpoint. - public string ApiEndpoint { get; } + public string ApiEndpoint { get; set; } /// Specification of the cluster configuration. - internal ClusterConfigEntity Config { get; } + internal ClusterConfigEntity Config { get; set; } /// The lifecycle phase of the cluster. public string ConfigKind { - get => Config?.Kind; + get => Config is null ? default : Config.Kind; + set + { + if (Config is null) + Config = new ClusterConfigEntity(); + Config.Kind = value; + } } /// Specification of the cluster environment. - public SCClusterNetworkEnvironmentEntity Environment { get; } + public SCClusterNetworkEnvironmentEntity Environment { get; set; } /// Specification of the cluster network. - public SCClusterNetworkEnvironmentEntity Network { get; } + public SCClusterNetworkEnvironmentEntity Network { get; set; } /// Specification of the cluster byok. - public SCClusterByokEntity Byok { get; } + public SCClusterByokEntity Byok { get; set; } } } diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCMetadataEntity.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCMetadataEntity.cs index 720f62ca12fb..8e7908a47be9 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCMetadataEntity.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCMetadataEntity.cs @@ -46,7 +46,7 @@ public partial class SCMetadataEntity private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal SCMetadataEntity() + public SCMetadataEntity() { } @@ -68,14 +68,14 @@ internal SCMetadataEntity(string self, string resourceName, DateTimeOffset? crea } /// Self lookup url. - public string Self { get; } + public string Self { get; set; } /// Resource name of the record. - public string ResourceName { get; } + public string ResourceName { get; set; } /// Created Date Time. - public DateTimeOffset? CreatedOn { get; } + public DateTimeOffset? CreatedOn { get; set; } /// Updated Date time. - public DateTimeOffset? UpdatedOn { get; } + public DateTimeOffset? UpdatedOn { get; set; } /// Deleted Date time. - public DateTimeOffset? DeletedOn { get; } + public DateTimeOffset? DeletedOn { get; set; } } } diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/StreamGovernanceConfig.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/StreamGovernanceConfig.Serialization.cs new file mode 100644 index 000000000000..e5575f9c16c5 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/StreamGovernanceConfig.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Confluent.Models +{ + internal partial class StreamGovernanceConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StreamGovernanceConfig)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Package)) + { + writer.WritePropertyName("package"u8); + writer.WriteStringValue(Package.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + StreamGovernanceConfig 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(StreamGovernanceConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStreamGovernanceConfig(document.RootElement, options); + } + + internal static StreamGovernanceConfig DeserializeStreamGovernanceConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Package? package = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("package"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + package = new Package(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StreamGovernanceConfig(package, 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(StreamGovernanceConfig)} does not support writing '{options.Format}' format."); + } + } + + StreamGovernanceConfig 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 DeserializeStreamGovernanceConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StreamGovernanceConfig)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCEnvironmentRecord.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/StreamGovernanceConfig.cs similarity index 62% rename from sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCEnvironmentRecord.cs rename to sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/StreamGovernanceConfig.cs index 57866c1c2499..454eb228efdf 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCEnvironmentRecord.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/StreamGovernanceConfig.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.Confluent.Models { - /// Details about environment name, metadata and environment id of an environment. - public partial class SCEnvironmentRecord + /// Stream governance configuration. + internal partial class StreamGovernanceConfig { /// /// Keeps track of any properties unknown to the library. @@ -45,33 +45,21 @@ public partial class SCEnvironmentRecord /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - internal SCEnvironmentRecord() + /// Initializes a new instance of . + public StreamGovernanceConfig() { } - /// Initializes a new instance of . - /// Type of environment. - /// Id of the environment. - /// Display name of the environment. - /// Metadata of the record. + /// Initializes a new instance of . + /// Stream governance configuration. /// Keeps track of any properties unknown to the library. - internal SCEnvironmentRecord(string kind, string id, string name, SCMetadataEntity metadata, IDictionary serializedAdditionalRawData) + internal StreamGovernanceConfig(Package? package, IDictionary serializedAdditionalRawData) { - Kind = kind; - Id = id; - Name = name; - Metadata = metadata; + Package = package; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Type of environment. - public string Kind { get; } - /// Id of the environment. - public string Id { get; } - /// Display name of the environment. - public string Name { get; } - /// Metadata of the record. - public SCMetadataEntity Metadata { get; } + /// Stream governance configuration. + public Package? Package { get; set; } } } diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/TopicMetadataEntity.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/TopicMetadataEntity.Serialization.cs new file mode 100644 index 000000000000..6ee40f7828d6 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/TopicMetadataEntity.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Confluent.Models +{ + public partial class TopicMetadataEntity : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TopicMetadataEntity)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Self)) + { + writer.WritePropertyName("self"u8); + writer.WriteStringValue(Self); + } + if (Optional.IsDefined(ResourceName)) + { + writer.WritePropertyName("resourceName"u8); + writer.WriteStringValue(ResourceName); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TopicMetadataEntity 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(TopicMetadataEntity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTopicMetadataEntity(document.RootElement, options); + } + + internal static TopicMetadataEntity DeserializeTopicMetadataEntity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string self = default; + string resourceName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("self"u8)) + { + self = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceName"u8)) + { + resourceName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TopicMetadataEntity(self, resourceName, 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(TopicMetadataEntity)} does not support writing '{options.Format}' format."); + } + } + + TopicMetadataEntity 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 DeserializeTopicMetadataEntity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TopicMetadataEntity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/TopicMetadataEntity.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/TopicMetadataEntity.cs new file mode 100644 index 000000000000..93988d8dbcb4 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/TopicMetadataEntity.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// Metadata of the data record. + public partial class TopicMetadataEntity + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public TopicMetadataEntity() + { + } + + /// Initializes a new instance of . + /// Self lookup url. + /// Resource name of the record. + /// Keeps track of any properties unknown to the library. + internal TopicMetadataEntity(string self, string resourceName, IDictionary serializedAdditionalRawData) + { + Self = self; + ResourceName = resourceName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Self lookup url. + public string Self { get; set; } + /// Resource name of the record. + public string ResourceName { get; set; } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/TopicsInputConfig.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/TopicsInputConfig.Serialization.cs new file mode 100644 index 000000000000..fafe3d18f04d --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/TopicsInputConfig.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Confluent.Models +{ + public partial class TopicsInputConfig : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TopicsInputConfig)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TopicsInputConfig 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(TopicsInputConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTopicsInputConfig(document.RootElement, options); + } + + internal static TopicsInputConfig DeserializeTopicsInputConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TopicsInputConfig(name, value, 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(TopicsInputConfig)} does not support writing '{options.Format}' format."); + } + } + + TopicsInputConfig 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 DeserializeTopicsInputConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TopicsInputConfig)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/TopicsInputConfig.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/TopicsInputConfig.cs new file mode 100644 index 000000000000..96ff7ebcaf93 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/TopicsInputConfig.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// Topics input config. + public partial class TopicsInputConfig + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public TopicsInputConfig() + { + } + + /// Initializes a new instance of . + /// Name of the topic input config. + /// Value of the topic input config. + /// Keeps track of any properties unknown to the library. + internal TopicsInputConfig(string name, string value, IDictionary serializedAdditionalRawData) + { + Name = name; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Name of the topic input config. + public string Name { get; set; } + /// Value of the topic input config. + public string Value { get; set; } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/TopicsRelatedLink.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/TopicsRelatedLink.Serialization.cs new file mode 100644 index 000000000000..c1d7fa3bb59f --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/TopicsRelatedLink.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Confluent.Models +{ + internal partial class TopicsRelatedLink : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TopicsRelatedLink)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Related)) + { + writer.WritePropertyName("related"u8); + writer.WriteStringValue(Related); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + TopicsRelatedLink 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(TopicsRelatedLink)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTopicsRelatedLink(document.RootElement, options); + } + + internal static TopicsRelatedLink DeserializeTopicsRelatedLink(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string related = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("related"u8)) + { + related = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TopicsRelatedLink(related, 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(TopicsRelatedLink)} does not support writing '{options.Format}' format."); + } + } + + TopicsRelatedLink 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 DeserializeTopicsRelatedLink(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TopicsRelatedLink)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/TopicsRelatedLink.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/TopicsRelatedLink.cs new file mode 100644 index 000000000000..b4a79c854350 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/TopicsRelatedLink.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// Partition Config spec of the topic record. + internal partial class TopicsRelatedLink + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public TopicsRelatedLink() + { + } + + /// Initializes a new instance of . + /// Relationship of the topic. + /// Keeps track of any properties unknown to the library. + internal TopicsRelatedLink(string related, IDictionary serializedAdditionalRawData) + { + Related = related; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Relationship of the topic. + public string Related { get; set; } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/UnknownConnectorServiceTypeInfoBase.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/UnknownConnectorServiceTypeInfoBase.Serialization.cs new file mode 100644 index 000000000000..1a525a748d14 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/UnknownConnectorServiceTypeInfoBase.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Confluent.Models +{ + internal partial class UnknownConnectorServiceTypeInfoBase : 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(ConnectorServiceTypeInfoBase)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + ConnectorServiceTypeInfoBase 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(ConnectorServiceTypeInfoBase)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnectorServiceTypeInfoBase(document.RootElement, options); + } + + internal static UnknownConnectorServiceTypeInfoBase DeserializeUnknownConnectorServiceTypeInfoBase(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ConnectorServiceType connectorServiceType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("connectorServiceType"u8)) + { + connectorServiceType = new ConnectorServiceType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownConnectorServiceTypeInfoBase(connectorServiceType, 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(ConnectorServiceTypeInfoBase)} does not support writing '{options.Format}' format."); + } + } + + ConnectorServiceTypeInfoBase 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 DeserializeConnectorServiceTypeInfoBase(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ConnectorServiceTypeInfoBase)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/UnknownConnectorServiceTypeInfoBase.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/UnknownConnectorServiceTypeInfoBase.cs new file mode 100644 index 000000000000..90cb7a9c53e5 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/UnknownConnectorServiceTypeInfoBase.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// Unknown version of ConnectorServiceTypeInfoBase. + internal partial class UnknownConnectorServiceTypeInfoBase : ConnectorServiceTypeInfoBase + { + /// Initializes a new instance of . + /// The connector service type. + /// Keeps track of any properties unknown to the library. + internal UnknownConnectorServiceTypeInfoBase(ConnectorServiceType connectorServiceType, IDictionary serializedAdditionalRawData) : base(connectorServiceType, serializedAdditionalRawData) + { + ConnectorServiceType = connectorServiceType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownConnectorServiceTypeInfoBase() + { + } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/UnknownPartnerInfoBase.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/UnknownPartnerInfoBase.Serialization.cs new file mode 100644 index 000000000000..713aa07f0004 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/UnknownPartnerInfoBase.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Confluent.Models +{ + internal partial class UnknownPartnerInfoBase : 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(PartnerInfoBase)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + PartnerInfoBase 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(PartnerInfoBase)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePartnerInfoBase(document.RootElement, options); + } + + internal static UnknownPartnerInfoBase DeserializeUnknownPartnerInfoBase(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PartnerConnectorType partnerConnectorType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("partnerConnectorType"u8)) + { + partnerConnectorType = new PartnerConnectorType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownPartnerInfoBase(partnerConnectorType, 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(PartnerInfoBase)} does not support writing '{options.Format}' format."); + } + } + + PartnerInfoBase 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 DeserializePartnerInfoBase(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PartnerInfoBase)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/UnknownPartnerInfoBase.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/UnknownPartnerInfoBase.cs new file mode 100644 index 000000000000..aa03fdbffb89 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/UnknownPartnerInfoBase.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Confluent.Models +{ + /// Unknown version of PartnerInfoBase. + internal partial class UnknownPartnerInfoBase : PartnerInfoBase + { + /// Initializes a new instance of . + /// The partner connector type. + /// Keeps track of any properties unknown to the library. + internal UnknownPartnerInfoBase(PartnerConnectorType partnerConnectorType, IDictionary serializedAdditionalRawData) : base(partnerConnectorType, serializedAdditionalRawData) + { + PartnerConnectorType = partnerConnectorType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownPartnerInfoBase() + { + } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/AccessRestOperations.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/AccessRestOperations.cs index 56d3af0850d1..39ab6f04cb76 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/AccessRestOperations.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/AccessRestOperations.cs @@ -32,7 +32,7 @@ public AccessRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-13"; + _apiVersion = apiVersion ?? "2024-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/ClusterRestOperations.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/ClusterRestOperations.cs new file mode 100644 index 000000000000..229d3af5071c --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/ClusterRestOperations.cs @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Confluent +{ + internal partial class ClusterRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ClusterRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ClusterRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-07-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, SCClusterRecordData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendPath("/clusters/", false); + uri.AppendPath(clusterId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, SCClusterRecordData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendPath("/clusters/", false); + uri.AppendPath(clusterId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create confluent clusters. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Confluent Cluster resource model. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, SCClusterRecordData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + SCClusterRecordData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SCClusterRecordData.DeserializeSCClusterRecordData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create confluent clusters. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Confluent Cluster resource model. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, SCClusterRecordData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + SCClusterRecordData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SCClusterRecordData.DeserializeSCClusterRecordData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendPath("/clusters/", false); + uri.AppendPath(clusterId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendPath("/clusters/", false); + uri.AppendPath(clusterId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete confluent cluster by id. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete confluent cluster by id. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/ConnectorRestOperations.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/ConnectorRestOperations.cs new file mode 100644 index 000000000000..d4164380e0f1 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/ConnectorRestOperations.cs @@ -0,0 +1,619 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Confluent.Models; + +namespace Azure.ResourceManager.Confluent +{ + internal partial class ConnectorRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ConnectorRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ConnectorRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-07-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string connectorName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendPath("/clusters/", false); + uri.AppendPath(clusterId, true); + uri.AppendPath("/connectors/", false); + uri.AppendPath(connectorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string connectorName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendPath("/clusters/", false); + uri.AppendPath(clusterId, true); + uri.AppendPath("/connectors/", false); + uri.AppendPath(connectorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get confluent connector by Name. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Confluent connector name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, connectorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ConnectorResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ConnectorResourceData.DeserializeConnectorResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ConnectorResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get confluent connector by Name. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Confluent connector name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, connectorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ConnectorResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ConnectorResourceData.DeserializeConnectorResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ConnectorResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string connectorName, ConnectorResourceData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendPath("/clusters/", false); + uri.AppendPath(clusterId, true); + uri.AppendPath("/connectors/", false); + uri.AppendPath(connectorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string connectorName, ConnectorResourceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendPath("/clusters/", false); + uri.AppendPath(clusterId, true); + uri.AppendPath("/connectors/", false); + uri.AppendPath(connectorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create confluent connector by Name. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Confluent connector name. + /// Confluent Connector resource model. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string connectorName, ConnectorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, connectorName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + ConnectorResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ConnectorResourceData.DeserializeConnectorResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create confluent connector by Name. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Confluent connector name. + /// Confluent Connector resource model. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string connectorName, ConnectorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, connectorName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + ConnectorResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ConnectorResourceData.DeserializeConnectorResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string connectorName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendPath("/clusters/", false); + uri.AppendPath(clusterId, true); + uri.AppendPath("/connectors/", false); + uri.AppendPath(connectorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string connectorName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendPath("/clusters/", false); + uri.AppendPath(clusterId, true); + uri.AppendPath("/connectors/", false); + uri.AppendPath(connectorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete confluent connector by name. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Confluent connector name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, connectorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete confluent connector by name. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Confluent connector name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string connectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + Argument.AssertNotNullOrEmpty(connectorName, nameof(connectorName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, connectorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, int? pageSize, string pageToken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendPath("/clusters/", false); + uri.AppendPath(clusterId, true); + uri.AppendPath("/connectors", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (pageSize != null) + { + uri.AppendQuery("pageSize", pageSize.Value, true); + } + if (pageToken != null) + { + uri.AppendQuery("pageToken", pageToken, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, int? pageSize, string pageToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendPath("/clusters/", false); + uri.AppendPath(clusterId, true); + uri.AppendPath("/connectors", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (pageSize != null) + { + uri.AppendQuery("pageSize", pageSize.Value, true); + } + if (pageToken != null) + { + uri.AppendQuery("pageToken", pageToken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all the connectors in a cluster. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Pagination size. + /// An opaque pagination token to fetch the next set of records. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, pageSize, pageToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ListConnectorsSuccessResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ListConnectorsSuccessResponse.DeserializeListConnectorsSuccessResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all the connectors in a cluster. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Pagination size. + /// An opaque pagination token to fetch the next set of records. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, pageSize, pageToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ListConnectorsSuccessResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ListConnectorsSuccessResponse.DeserializeListConnectorsSuccessResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, int? pageSize, string pageToken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, int? pageSize, string pageToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all the connectors in a cluster. + /// The URL to the next page of results. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Pagination size. + /// An opaque pagination token to fetch the next set of records. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, pageSize, pageToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ListConnectorsSuccessResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ListConnectorsSuccessResponse.DeserializeListConnectorsSuccessResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all the connectors in a cluster. + /// The URL to the next page of results. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Pagination size. + /// An opaque pagination token to fetch the next set of records. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, pageSize, pageToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ListConnectorsSuccessResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ListConnectorsSuccessResponse.DeserializeListConnectorsSuccessResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/EnvironmentRestOperations.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/EnvironmentRestOperations.cs new file mode 100644 index 000000000000..f25cdd17beca --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/EnvironmentRestOperations.cs @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Confluent +{ + internal partial class EnvironmentRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of EnvironmentRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public EnvironmentRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-07-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, SCEnvironmentRecordData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, SCEnvironmentRecordData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create confluent environment. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent Environment resource model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, SCEnvironmentRecordData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, environmentId, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + SCEnvironmentRecordData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SCEnvironmentRecordData.DeserializeSCEnvironmentRecordData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create confluent environment. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent Environment resource model. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, SCEnvironmentRecordData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, environmentId, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + SCEnvironmentRecordData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SCEnvironmentRecordData.DeserializeSCEnvironmentRecordData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string environmentId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string organizationName, string environmentId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete confluent environment by id. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, environmentId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete confluent environment by id. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, environmentId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/MarketplaceAgreementsRestOperations.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/MarketplaceAgreementsRestOperations.cs index de6ff7ebe9b1..17e07135b446 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/MarketplaceAgreementsRestOperations.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/MarketplaceAgreementsRestOperations.cs @@ -32,7 +32,7 @@ public MarketplaceAgreementsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-13"; + _apiVersion = apiVersion ?? "2024-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/OrganizationRestOperations.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/OrganizationRestOperations.cs index 7aedd0119227..21f616249dcf 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/OrganizationRestOperations.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/OrganizationRestOperations.cs @@ -32,7 +32,7 @@ public OrganizationRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-13"; + _apiVersion = apiVersion ?? "2024-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -734,7 +734,7 @@ internal HttpMessage CreateGetEnvironmentByIdRequest(string subscriptionId, stri /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetEnvironmentByIdAsync(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, CancellationToken cancellationToken = default) + public async Task> GetEnvironmentByIdAsync(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -747,11 +747,13 @@ public async Task> GetEnvironmentByIdAsync(string { case 200: { - SCEnvironmentRecord value = default; + SCEnvironmentRecordData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SCEnvironmentRecord.DeserializeSCEnvironmentRecord(document.RootElement); + value = SCEnvironmentRecordData.DeserializeSCEnvironmentRecordData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((SCEnvironmentRecordData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -765,7 +767,7 @@ public async Task> GetEnvironmentByIdAsync(string /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response GetEnvironmentById(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, CancellationToken cancellationToken = default) + public Response GetEnvironmentById(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -778,11 +780,13 @@ public Response GetEnvironmentById(string subscriptionId, s { case 200: { - SCEnvironmentRecord value = default; + SCEnvironmentRecordData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SCEnvironmentRecord.DeserializeSCEnvironmentRecord(document.RootElement); + value = SCEnvironmentRecordData.DeserializeSCEnvironmentRecordData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((SCEnvironmentRecordData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -1603,7 +1607,7 @@ internal HttpMessage CreateGetClusterByIdRequest(string subscriptionId, string r /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetClusterByIdAsync(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, CancellationToken cancellationToken = default) + public async Task> GetClusterByIdAsync(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -1617,11 +1621,13 @@ public async Task> GetClusterByIdAsync(string subscrip { case 200: { - SCClusterRecord value = default; + SCClusterRecordData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SCClusterRecord.DeserializeSCClusterRecord(document.RootElement); + value = SCClusterRecordData.DeserializeSCClusterRecordData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((SCClusterRecordData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -1636,7 +1642,7 @@ public async Task> GetClusterByIdAsync(string subscrip /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response GetClusterById(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, CancellationToken cancellationToken = default) + public Response GetClusterById(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -1650,11 +1656,13 @@ public Response GetClusterById(string subscriptionId, string re { case 200: { - SCClusterRecord value = default; + SCClusterRecordData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SCClusterRecord.DeserializeSCClusterRecord(document.RootElement); + value = SCClusterRecordData.DeserializeSCClusterRecordData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((SCClusterRecordData)null, message.Response); default: throw new RequestFailedException(message.Response); } diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/TopicsRestOperations.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/TopicsRestOperations.cs new file mode 100644 index 000000000000..65befce83440 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/TopicsRestOperations.cs @@ -0,0 +1,619 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Confluent.Models; + +namespace Azure.ResourceManager.Confluent +{ + internal partial class TopicsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of TopicsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public TopicsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2024-07-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, int? pageSize, string pageToken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendPath("/clusters/", false); + uri.AppendPath(clusterId, true); + uri.AppendPath("/topics", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (pageSize != null) + { + uri.AppendQuery("pageSize", pageSize.Value, true); + } + if (pageToken != null) + { + uri.AppendQuery("pageToken", pageToken, true); + } + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, int? pageSize, string pageToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendPath("/clusters/", false); + uri.AppendPath(clusterId, true); + uri.AppendPath("/topics", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (pageSize != null) + { + uri.AppendQuery("pageSize", pageSize.Value, true); + } + if (pageToken != null) + { + uri.AppendQuery("pageToken", pageToken, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists of all the topics in a clusters. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Pagination size. + /// An opaque pagination token to fetch the next set of records. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, pageSize, pageToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ListTopicsSuccessResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ListTopicsSuccessResponse.DeserializeListTopicsSuccessResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists of all the topics in a clusters. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Pagination size. + /// An opaque pagination token to fetch the next set of records. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, pageSize, pageToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ListTopicsSuccessResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ListTopicsSuccessResponse.DeserializeListTopicsSuccessResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string topicName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendPath("/clusters/", false); + uri.AppendPath(clusterId, true); + uri.AppendPath("/topics/", false); + uri.AppendPath(topicName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string topicName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendPath("/clusters/", false); + uri.AppendPath(clusterId, true); + uri.AppendPath("/topics/", false); + uri.AppendPath(topicName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get confluent topic by Name. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Confluent kafka or schema registry topic name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string topicName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, topicName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + TopicRecordData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = TopicRecordData.DeserializeTopicRecordData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((TopicRecordData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get confluent topic by Name. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Confluent kafka or schema registry topic name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string topicName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, topicName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + TopicRecordData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = TopicRecordData.DeserializeTopicRecordData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((TopicRecordData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string topicName, TopicRecordData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendPath("/clusters/", false); + uri.AppendPath(clusterId, true); + uri.AppendPath("/topics/", false); + uri.AppendPath(topicName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string topicName, TopicRecordData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendPath("/clusters/", false); + uri.AppendPath(clusterId, true); + uri.AppendPath("/topics/", false); + uri.AppendPath(topicName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create confluent topics by Name. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Confluent kafka or schema registry topic name. + /// Confluent Topics resource model. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> CreateAsync(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string topicName, TopicRecordData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, topicName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + TopicRecordData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = TopicRecordData.DeserializeTopicRecordData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create confluent topics by Name. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Confluent kafka or schema registry topic name. + /// Confluent Topics resource model. + /// The cancellation token to use. + /// , , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string topicName, TopicRecordData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, topicName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + TopicRecordData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = TopicRecordData.DeserializeTopicRecordData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string topicName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendPath("/clusters/", false); + uri.AppendPath(clusterId, true); + uri.AppendPath("/topics/", false); + uri.AppendPath(topicName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string topicName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Confluent/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendPath("/environments/", false); + uri.AppendPath(environmentId, true); + uri.AppendPath("/clusters/", false); + uri.AppendPath(clusterId, true); + uri.AppendPath("/topics/", false); + uri.AppendPath(topicName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete confluent topic by name. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Confluent kafka or schema registry topic name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string topicName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, topicName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete confluent topic by name. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Confluent kafka or schema registry topic name. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string topicName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, topicName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, int? pageSize, string pageToken) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, int? pageSize, string pageToken) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists of all the topics in a clusters. + /// The URL to the next page of results. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Pagination size. + /// An opaque pagination token to fetch the next set of records. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, pageSize, pageToken); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ListTopicsSuccessResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ListTopicsSuccessResponse.DeserializeListTopicsSuccessResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists of all the topics in a clusters. + /// The URL to the next page of results. + /// Microsoft Azure subscription id. + /// The name of the resource group. The name is case insensitive. + /// Organization resource name. + /// Confluent environment id. + /// Confluent kafka or schema registry cluster id. + /// Pagination size. + /// An opaque pagination token to fetch the next set of records. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, organizationName, environmentId, clusterId, pageSize, pageToken); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ListTopicsSuccessResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ListTopicsSuccessResponse.DeserializeListTopicsSuccessResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/ValidationsRestOperations.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/ValidationsRestOperations.cs index 50c710651e6a..323c1450463e 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/ValidationsRestOperations.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/RestOperations/ValidationsRestOperations.cs @@ -32,7 +32,7 @@ public ValidationsRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-13"; + _apiVersion = apiVersion ?? "2024-07-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCClusterRecordCollection.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCClusterRecordCollection.cs new file mode 100644 index 000000000000..0ec107cc3ba1 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCClusterRecordCollection.cs @@ -0,0 +1,506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Confluent +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSCClusterRecords method from an instance of . + /// + public partial class SCClusterRecordCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _scClusterRecordClusterClientDiagnostics; + private readonly ClusterRestOperations _scClusterRecordClusterRestClient; + private readonly ClientDiagnostics _scClusterRecordOrganizationClientDiagnostics; + private readonly OrganizationRestOperations _scClusterRecordOrganizationRestClient; + + /// Initializes a new instance of the class for mocking. + protected SCClusterRecordCollection() + { + } + + /// 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 SCClusterRecordCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _scClusterRecordClusterClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Confluent", SCClusterRecordResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SCClusterRecordResource.ResourceType, out string scClusterRecordClusterApiVersion); + _scClusterRecordClusterRestClient = new ClusterRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, scClusterRecordClusterApiVersion); + _scClusterRecordOrganizationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Confluent", SCClusterRecordResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SCClusterRecordResource.ResourceType, out string scClusterRecordOrganizationApiVersion); + _scClusterRecordOrganizationRestClient = new OrganizationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, scClusterRecordOrganizationApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SCEnvironmentRecordResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SCEnvironmentRecordResource.ResourceType), nameof(id)); + } + + /// + /// Create confluent clusters + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId} + /// + /// + /// Operation Id + /// Cluster_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Confluent kafka or schema registry cluster id. + /// Confluent Cluster resource model. + /// 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 clusterId, SCClusterRecordData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _scClusterRecordClusterClientDiagnostics.CreateScope("SCClusterRecordCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _scClusterRecordClusterRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, clusterId, data, cancellationToken).ConfigureAwait(false); + var uri = _scClusterRecordClusterRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, clusterId, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ConfluentArmOperation(Response.FromValue(new SCClusterRecordResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create confluent clusters + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId} + /// + /// + /// Operation Id + /// Cluster_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Confluent kafka or schema registry cluster id. + /// Confluent Cluster resource model. + /// 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 clusterId, SCClusterRecordData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _scClusterRecordClusterClientDiagnostics.CreateScope("SCClusterRecordCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _scClusterRecordClusterRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, clusterId, data, cancellationToken); + var uri = _scClusterRecordClusterRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, clusterId, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ConfluentArmOperation(Response.FromValue(new SCClusterRecordResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get cluster by Id + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId} + /// + /// + /// Operation Id + /// Organization_GetClusterById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent kafka or schema registry cluster id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string clusterId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + + using var scope = _scClusterRecordOrganizationClientDiagnostics.CreateScope("SCClusterRecordCollection.Get"); + scope.Start(); + try + { + var response = await _scClusterRecordOrganizationRestClient.GetClusterByIdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, clusterId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SCClusterRecordResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get cluster by Id + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId} + /// + /// + /// Operation Id + /// Organization_GetClusterById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent kafka or schema registry cluster id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string clusterId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + + using var scope = _scClusterRecordOrganizationClientDiagnostics.CreateScope("SCClusterRecordCollection.Get"); + scope.Start(); + try + { + var response = _scClusterRecordOrganizationRestClient.GetClusterById(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, clusterId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SCClusterRecordResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists of all the clusters in a environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters + /// + /// + /// Operation Id + /// Organization_ListClusters + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Pagination size. + /// An opaque pagination token to fetch the next set of records. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _scClusterRecordOrganizationRestClient.CreateListClustersRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, pageSizeHint, pageToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _scClusterRecordOrganizationRestClient.CreateListClustersNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, pageSizeHint, pageToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SCClusterRecordResource(Client, SCClusterRecordData.DeserializeSCClusterRecordData(e)), _scClusterRecordOrganizationClientDiagnostics, Pipeline, "SCClusterRecordCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists of all the clusters in a environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters + /// + /// + /// Operation Id + /// Organization_ListClusters + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Pagination size. + /// An opaque pagination token to fetch the next set of records. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _scClusterRecordOrganizationRestClient.CreateListClustersRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, pageSizeHint, pageToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _scClusterRecordOrganizationRestClient.CreateListClustersNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, pageSizeHint, pageToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SCClusterRecordResource(Client, SCClusterRecordData.DeserializeSCClusterRecordData(e)), _scClusterRecordOrganizationClientDiagnostics, Pipeline, "SCClusterRecordCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId} + /// + /// + /// Operation Id + /// Organization_GetClusterById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent kafka or schema registry cluster id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string clusterId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + + using var scope = _scClusterRecordOrganizationClientDiagnostics.CreateScope("SCClusterRecordCollection.Exists"); + scope.Start(); + try + { + var response = await _scClusterRecordOrganizationRestClient.GetClusterByIdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, clusterId, 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.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId} + /// + /// + /// Operation Id + /// Organization_GetClusterById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent kafka or schema registry cluster id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string clusterId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + + using var scope = _scClusterRecordOrganizationClientDiagnostics.CreateScope("SCClusterRecordCollection.Exists"); + scope.Start(); + try + { + var response = _scClusterRecordOrganizationRestClient.GetClusterById(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, clusterId, 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.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId} + /// + /// + /// Operation Id + /// Organization_GetClusterById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent kafka or schema registry cluster id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string clusterId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + + using var scope = _scClusterRecordOrganizationClientDiagnostics.CreateScope("SCClusterRecordCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _scClusterRecordOrganizationRestClient.GetClusterByIdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, clusterId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SCClusterRecordResource(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.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId} + /// + /// + /// Operation Id + /// Organization_GetClusterById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent kafka or schema registry cluster id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string clusterId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + + using var scope = _scClusterRecordOrganizationClientDiagnostics.CreateScope("SCClusterRecordCollection.GetIfExists"); + scope.Start(); + try + { + var response = _scClusterRecordOrganizationRestClient.GetClusterById(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, clusterId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SCClusterRecordResource(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/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterRecord.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCClusterRecordData.Serialization.cs similarity index 76% rename from sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterRecord.Serialization.cs rename to sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCClusterRecordData.Serialization.cs index e5e7328c64a0..ebd7f07c51cb 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterRecord.Serialization.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCClusterRecordData.Serialization.cs @@ -10,14 +10,15 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Confluent.Models; -namespace Azure.ResourceManager.Confluent.Models +namespace Azure.ResourceManager.Confluent { - public partial class SCClusterRecord : IUtf8JsonSerializable, IJsonModel + public partial class SCClusterRecordData : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +29,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(SCClusterRecord)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(SCClusterRecordData)} does not support writing '{format}' format."); } if (Optional.IsDefined(Kind)) @@ -44,6 +45,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); } + if (Optional.IsDefined(ResourceType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -84,19 +90,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SCClusterRecord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SCClusterRecordData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(SCClusterRecord)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(SCClusterRecordData)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSCClusterRecord(document.RootElement, options); + return DeserializeSCClusterRecordData(document.RootElement, options); } - internal static SCClusterRecord DeserializeSCClusterRecord(JsonElement element, ModelReaderWriterOptions options = null) + internal static SCClusterRecordData DeserializeSCClusterRecordData(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -106,6 +112,7 @@ internal static SCClusterRecord DeserializeSCClusterRecord(JsonElement element, } string kind = default; string id = default; + string type = default; string name = default; SCMetadataEntity metadata = default; SCClusterSpecEntity spec = default; @@ -124,6 +131,11 @@ internal static SCClusterRecord DeserializeSCClusterRecord(JsonElement element, id = property.Value.GetString(); continue; } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } if (property.NameEquals("name"u8)) { name = property.Value.GetString(); @@ -174,9 +186,10 @@ internal static SCClusterRecord DeserializeSCClusterRecord(JsonElement element, } } serializedAdditionalRawData = rawDataDictionary; - return new SCClusterRecord( + return new SCClusterRecordData( kind, id, + type, name, metadata, spec, @@ -184,35 +197,35 @@ internal static SCClusterRecord DeserializeSCClusterRecord(JsonElement element, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(SCClusterRecord)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SCClusterRecordData)} does not support writing '{options.Format}' format."); } } - SCClusterRecord IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SCClusterRecordData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeSCClusterRecord(document.RootElement, options); + return DeserializeSCClusterRecordData(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SCClusterRecord)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SCClusterRecordData)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterRecord.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCClusterRecordData.cs similarity index 72% rename from sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterRecord.cs rename to sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCClusterRecordData.cs index 80100e5186c5..bea67b28dd8b 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCClusterRecord.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCClusterRecordData.cs @@ -7,11 +7,15 @@ using System; using System.Collections.Generic; +using Azure.ResourceManager.Confluent.Models; -namespace Azure.ResourceManager.Confluent.Models +namespace Azure.ResourceManager.Confluent { - /// Details of cluster record. - public partial class SCClusterRecord + /// + /// A class representing the SCClusterRecord data model. + /// Details of cluster record + /// + public partial class SCClusterRecordData { /// /// Keeps track of any properties unknown to the library. @@ -45,23 +49,25 @@ public partial class SCClusterRecord /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - internal SCClusterRecord() + /// Initializes a new instance of . + public SCClusterRecordData() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Type of cluster. /// Id of the cluster. + /// Type of the resource. /// Display name of the cluster. /// Metadata of the record. /// Specification of the cluster. /// Specification of the cluster status. /// Keeps track of any properties unknown to the library. - internal SCClusterRecord(string kind, string id, string name, SCMetadataEntity metadata, SCClusterSpecEntity spec, ClusterStatusEntity status, IDictionary serializedAdditionalRawData) + internal SCClusterRecordData(string kind, string id, string resourceType, string name, SCMetadataEntity metadata, SCClusterSpecEntity spec, ClusterStatusEntity status, IDictionary serializedAdditionalRawData) { Kind = kind; Id = id; + ResourceType = resourceType; Name = name; Metadata = metadata; Spec = spec; @@ -70,16 +76,18 @@ internal SCClusterRecord(string kind, string id, string name, SCMetadataEntity m } /// Type of cluster. - public string Kind { get; } + public string Kind { get; set; } /// Id of the cluster. - public string Id { get; } + public string Id { get; set; } + /// Type of the resource. + public string ResourceType { get; set; } /// Display name of the cluster. - public string Name { get; } + public string Name { get; set; } /// Metadata of the record. - public SCMetadataEntity Metadata { get; } + public SCMetadataEntity Metadata { get; set; } /// Specification of the cluster. - public SCClusterSpecEntity Spec { get; } + public SCClusterSpecEntity Spec { get; set; } /// Specification of the cluster status. - public ClusterStatusEntity Status { get; } + public ClusterStatusEntity Status { get; set; } } } diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCClusterRecordResource.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCClusterRecordResource.Serialization.cs new file mode 100644 index 000000000000..ab955207883b --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCClusterRecordResource.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.Confluent +{ + public partial class SCClusterRecordResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SCClusterRecordData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SCClusterRecordData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCClusterRecordResource.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCClusterRecordResource.cs new file mode 100644 index 000000000000..ae50b8beaec4 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCClusterRecordResource.cs @@ -0,0 +1,580 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Confluent.Models; + +namespace Azure.ResourceManager.Confluent +{ + /// + /// A Class representing a SCClusterRecord along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSCClusterRecordResource method. + /// Otherwise you can get one from its parent resource using the GetSCClusterRecord method. + /// + public partial class SCClusterRecordResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The organizationName. + /// The environmentId. + /// The clusterId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _scClusterRecordOrganizationClientDiagnostics; + private readonly OrganizationRestOperations _scClusterRecordOrganizationRestClient; + private readonly ClientDiagnostics _scClusterRecordClusterClientDiagnostics; + private readonly ClusterRestOperations _scClusterRecordClusterRestClient; + private readonly SCClusterRecordData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Confluent/organizations/environments/clusters"; + + /// Initializes a new instance of the class for mocking. + protected SCClusterRecordResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SCClusterRecordResource(ArmClient client, SCClusterRecordData data) : this(client, new ResourceIdentifier(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 SCClusterRecordResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _scClusterRecordOrganizationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Confluent", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string scClusterRecordOrganizationApiVersion); + _scClusterRecordOrganizationRestClient = new OrganizationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, scClusterRecordOrganizationApiVersion); + _scClusterRecordClusterClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Confluent", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string scClusterRecordClusterApiVersion); + _scClusterRecordClusterRestClient = new ClusterRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, scClusterRecordClusterApiVersion); +#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 SCClusterRecordData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of ConnectorResources in the SCClusterRecord. + /// An object representing collection of ConnectorResources and their operations over a ConnectorResource. + public virtual ConnectorResourceCollection GetConnectorResources() + { + return GetCachedClient(client => new ConnectorResourceCollection(client, Id)); + } + + /// + /// Get confluent connector by Name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent connector name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetConnectorResourceAsync(string connectorName, CancellationToken cancellationToken = default) + { + return await GetConnectorResources().GetAsync(connectorName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get confluent connector by Name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/connectors/{connectorName} + /// + /// + /// Operation Id + /// Connector_Get + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent connector name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetConnectorResource(string connectorName, CancellationToken cancellationToken = default) + { + return GetConnectorResources().Get(connectorName, cancellationToken); + } + + /// Gets a collection of TopicRecordResources in the SCClusterRecord. + /// An object representing collection of TopicRecordResources and their operations over a TopicRecordResource. + public virtual TopicRecordCollection GetTopicRecords() + { + return GetCachedClient(client => new TopicRecordCollection(client, Id)); + } + + /// + /// Get confluent topic by Name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics/{topicName} + /// + /// + /// Operation Id + /// Topics_Get + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent kafka or schema registry topic name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetTopicRecordAsync(string topicName, CancellationToken cancellationToken = default) + { + return await GetTopicRecords().GetAsync(topicName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get confluent topic by Name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics/{topicName} + /// + /// + /// Operation Id + /// Topics_Get + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent kafka or schema registry topic name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetTopicRecord(string topicName, CancellationToken cancellationToken = default) + { + return GetTopicRecords().Get(topicName, cancellationToken); + } + + /// + /// Get cluster by Id + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId} + /// + /// + /// Operation Id + /// Organization_GetClusterById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _scClusterRecordOrganizationClientDiagnostics.CreateScope("SCClusterRecordResource.Get"); + scope.Start(); + try + { + var response = await _scClusterRecordOrganizationRestClient.GetClusterByIdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SCClusterRecordResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get cluster by Id + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId} + /// + /// + /// Operation Id + /// Organization_GetClusterById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _scClusterRecordOrganizationClientDiagnostics.CreateScope("SCClusterRecordResource.Get"); + scope.Start(); + try + { + var response = _scClusterRecordOrganizationRestClient.GetClusterById(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SCClusterRecordResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete confluent cluster by id + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId} + /// + /// + /// Operation Id + /// Cluster_Delete + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _scClusterRecordClusterClientDiagnostics.CreateScope("SCClusterRecordResource.Delete"); + scope.Start(); + try + { + var response = await _scClusterRecordClusterRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ConfluentArmOperation(_scClusterRecordClusterClientDiagnostics, Pipeline, _scClusterRecordClusterRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete confluent cluster by id + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId} + /// + /// + /// Operation Id + /// Cluster_Delete + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _scClusterRecordClusterClientDiagnostics.CreateScope("SCClusterRecordResource.Delete"); + scope.Start(); + try + { + var response = _scClusterRecordClusterRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new ConfluentArmOperation(_scClusterRecordClusterClientDiagnostics, Pipeline, _scClusterRecordClusterRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create confluent clusters + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId} + /// + /// + /// Operation Id + /// Cluster_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Confluent Cluster resource model. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, SCClusterRecordData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _scClusterRecordClusterClientDiagnostics.CreateScope("SCClusterRecordResource.Update"); + scope.Start(); + try + { + var response = await _scClusterRecordClusterRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _scClusterRecordClusterRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ConfluentArmOperation(Response.FromValue(new SCClusterRecordResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create confluent clusters + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId} + /// + /// + /// Operation Id + /// Cluster_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Confluent Cluster resource model. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, SCClusterRecordData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _scClusterRecordClusterClientDiagnostics.CreateScope("SCClusterRecordResource.Update"); + scope.Start(); + try + { + var response = _scClusterRecordClusterRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var uri = _scClusterRecordClusterRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ConfluentArmOperation(Response.FromValue(new SCClusterRecordResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/createAPIKey + /// + /// + /// Operation Id + /// Organization_CreateApiKey + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Request payload for get creating API Key for schema registry Cluster ID or Kafka Cluster ID under a environment. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateApiKeyAsync(ConfluentApiKeyCreateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _scClusterRecordOrganizationClientDiagnostics.CreateScope("SCClusterRecordResource.CreateApiKey"); + scope.Start(); + try + { + var response = await _scClusterRecordOrganizationRestClient.CreateApiKeyAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/createAPIKey + /// + /// + /// Operation Id + /// Organization_CreateApiKey + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Request payload for get creating API Key for schema registry Cluster ID or Kafka Cluster ID under a environment. + /// The cancellation token to use. + /// is null. + public virtual Response CreateApiKey(ConfluentApiKeyCreateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _scClusterRecordOrganizationClientDiagnostics.CreateScope("SCClusterRecordResource.CreateApiKey"); + scope.Start(); + try + { + var response = _scClusterRecordOrganizationRestClient.CreateApiKey(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCEnvironmentRecordCollection.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCEnvironmentRecordCollection.cs new file mode 100644 index 000000000000..013f42cba1fe --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCEnvironmentRecordCollection.cs @@ -0,0 +1,506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Confluent +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSCEnvironmentRecords method from an instance of . + /// + public partial class SCEnvironmentRecordCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _scEnvironmentRecordEnvironmentClientDiagnostics; + private readonly EnvironmentRestOperations _scEnvironmentRecordEnvironmentRestClient; + private readonly ClientDiagnostics _scEnvironmentRecordOrganizationClientDiagnostics; + private readonly OrganizationRestOperations _scEnvironmentRecordOrganizationRestClient; + + /// Initializes a new instance of the class for mocking. + protected SCEnvironmentRecordCollection() + { + } + + /// 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 SCEnvironmentRecordCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _scEnvironmentRecordEnvironmentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Confluent", SCEnvironmentRecordResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SCEnvironmentRecordResource.ResourceType, out string scEnvironmentRecordEnvironmentApiVersion); + _scEnvironmentRecordEnvironmentRestClient = new EnvironmentRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, scEnvironmentRecordEnvironmentApiVersion); + _scEnvironmentRecordOrganizationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Confluent", SCEnvironmentRecordResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SCEnvironmentRecordResource.ResourceType, out string scEnvironmentRecordOrganizationApiVersion); + _scEnvironmentRecordOrganizationRestClient = new OrganizationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, scEnvironmentRecordOrganizationApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ConfluentOrganizationResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ConfluentOrganizationResource.ResourceType), nameof(id)); + } + + /// + /// Create confluent environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId} + /// + /// + /// Operation Id + /// Environment_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Confluent environment id. + /// Confluent Environment resource model. + /// 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 environmentId, SCEnvironmentRecordData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _scEnvironmentRecordEnvironmentClientDiagnostics.CreateScope("SCEnvironmentRecordCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _scEnvironmentRecordEnvironmentRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, data, cancellationToken).ConfigureAwait(false); + var uri = _scEnvironmentRecordEnvironmentRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ConfluentArmOperation(Response.FromValue(new SCEnvironmentRecordResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create confluent environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId} + /// + /// + /// Operation Id + /// Environment_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Confluent environment id. + /// Confluent Environment resource model. + /// 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 environmentId, SCEnvironmentRecordData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _scEnvironmentRecordEnvironmentClientDiagnostics.CreateScope("SCEnvironmentRecordCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _scEnvironmentRecordEnvironmentRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, data, cancellationToken); + var uri = _scEnvironmentRecordEnvironmentRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ConfluentArmOperation(Response.FromValue(new SCEnvironmentRecordResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Environment details by environment Id + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId} + /// + /// + /// Operation Id + /// Organization_GetEnvironmentById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent environment id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string environmentId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + + using var scope = _scEnvironmentRecordOrganizationClientDiagnostics.CreateScope("SCEnvironmentRecordCollection.Get"); + scope.Start(); + try + { + var response = await _scEnvironmentRecordOrganizationRestClient.GetEnvironmentByIdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SCEnvironmentRecordResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Environment details by environment Id + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId} + /// + /// + /// Operation Id + /// Organization_GetEnvironmentById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent environment id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string environmentId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + + using var scope = _scEnvironmentRecordOrganizationClientDiagnostics.CreateScope("SCEnvironmentRecordCollection.Get"); + scope.Start(); + try + { + var response = _scEnvironmentRecordOrganizationRestClient.GetEnvironmentById(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SCEnvironmentRecordResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists of all the environments in a organization + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments + /// + /// + /// Operation Id + /// Organization_ListEnvironments + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Pagination size. + /// An opaque pagination token to fetch the next set of records. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _scEnvironmentRecordOrganizationRestClient.CreateListEnvironmentsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint, pageToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _scEnvironmentRecordOrganizationRestClient.CreateListEnvironmentsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint, pageToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SCEnvironmentRecordResource(Client, SCEnvironmentRecordData.DeserializeSCEnvironmentRecordData(e)), _scEnvironmentRecordOrganizationClientDiagnostics, Pipeline, "SCEnvironmentRecordCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists of all the environments in a organization + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments + /// + /// + /// Operation Id + /// Organization_ListEnvironments + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Pagination size. + /// An opaque pagination token to fetch the next set of records. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _scEnvironmentRecordOrganizationRestClient.CreateListEnvironmentsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint, pageToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _scEnvironmentRecordOrganizationRestClient.CreateListEnvironmentsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, pageSizeHint, pageToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SCEnvironmentRecordResource(Client, SCEnvironmentRecordData.DeserializeSCEnvironmentRecordData(e)), _scEnvironmentRecordOrganizationClientDiagnostics, Pipeline, "SCEnvironmentRecordCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId} + /// + /// + /// Operation Id + /// Organization_GetEnvironmentById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent environment id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string environmentId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + + using var scope = _scEnvironmentRecordOrganizationClientDiagnostics.CreateScope("SCEnvironmentRecordCollection.Exists"); + scope.Start(); + try + { + var response = await _scEnvironmentRecordOrganizationRestClient.GetEnvironmentByIdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, 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.Confluent/organizations/{organizationName}/environments/{environmentId} + /// + /// + /// Operation Id + /// Organization_GetEnvironmentById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent environment id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string environmentId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + + using var scope = _scEnvironmentRecordOrganizationClientDiagnostics.CreateScope("SCEnvironmentRecordCollection.Exists"); + scope.Start(); + try + { + var response = _scEnvironmentRecordOrganizationRestClient.GetEnvironmentById(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, 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.Confluent/organizations/{organizationName}/environments/{environmentId} + /// + /// + /// Operation Id + /// Organization_GetEnvironmentById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent environment id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string environmentId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + + using var scope = _scEnvironmentRecordOrganizationClientDiagnostics.CreateScope("SCEnvironmentRecordCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _scEnvironmentRecordOrganizationRestClient.GetEnvironmentByIdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SCEnvironmentRecordResource(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.Confluent/organizations/{organizationName}/environments/{environmentId} + /// + /// + /// Operation Id + /// Organization_GetEnvironmentById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent environment id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string environmentId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(environmentId, nameof(environmentId)); + + using var scope = _scEnvironmentRecordOrganizationClientDiagnostics.CreateScope("SCEnvironmentRecordCollection.GetIfExists"); + scope.Start(); + try + { + var response = _scEnvironmentRecordOrganizationRestClient.GetEnvironmentById(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, environmentId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SCEnvironmentRecordResource(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/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCEnvironmentRecord.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCEnvironmentRecordData.Serialization.cs similarity index 62% rename from sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCEnvironmentRecord.Serialization.cs rename to sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCEnvironmentRecordData.Serialization.cs index 14ae0fc82590..1e1c5759f872 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/Models/SCEnvironmentRecord.Serialization.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCEnvironmentRecordData.Serialization.cs @@ -10,14 +10,15 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Confluent.Models; -namespace Azure.ResourceManager.Confluent.Models +namespace Azure.ResourceManager.Confluent { - public partial class SCEnvironmentRecord : IUtf8JsonSerializable, IJsonModel + public partial class SCEnvironmentRecordData : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +29,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(SCEnvironmentRecord)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(SCEnvironmentRecordData)} does not support writing '{format}' format."); } if (Optional.IsDefined(Kind)) @@ -44,6 +45,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); } + if (Optional.IsDefined(ResourceType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); @@ -51,6 +57,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (Optional.IsDefined(StreamGovernanceConfig)) + { + writer.WritePropertyName("streamGovernanceConfig"u8); + writer.WriteObjectValue(StreamGovernanceConfig, options); + } if (Optional.IsDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -74,19 +85,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SCEnvironmentRecord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SCEnvironmentRecordData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(SCEnvironmentRecord)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(SCEnvironmentRecordData)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSCEnvironmentRecord(document.RootElement, options); + return DeserializeSCEnvironmentRecordData(document.RootElement, options); } - internal static SCEnvironmentRecord DeserializeSCEnvironmentRecord(JsonElement element, ModelReaderWriterOptions options = null) + internal static SCEnvironmentRecordData DeserializeSCEnvironmentRecordData(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -96,7 +107,9 @@ internal static SCEnvironmentRecord DeserializeSCEnvironmentRecord(JsonElement e } string kind = default; string id = default; + string type = default; string name = default; + StreamGovernanceConfig streamGovernanceConfig = default; SCMetadataEntity metadata = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -112,6 +125,11 @@ internal static SCEnvironmentRecord DeserializeSCEnvironmentRecord(JsonElement e id = property.Value.GetString(); continue; } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } if (property.NameEquals("name"u8)) { name = property.Value.GetString(); @@ -126,6 +144,15 @@ internal static SCEnvironmentRecord DeserializeSCEnvironmentRecord(JsonElement e } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("streamGovernanceConfig"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + streamGovernanceConfig = StreamGovernanceConfig.DeserializeStreamGovernanceConfig(property0.Value, options); + continue; + } if (property0.NameEquals("metadata"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -144,38 +171,45 @@ internal static SCEnvironmentRecord DeserializeSCEnvironmentRecord(JsonElement e } } serializedAdditionalRawData = rawDataDictionary; - return new SCEnvironmentRecord(kind, id, name, metadata, serializedAdditionalRawData); + return new SCEnvironmentRecordData( + kind, + id, + type, + name, + streamGovernanceConfig, + metadata, + serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(SCEnvironmentRecord)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SCEnvironmentRecordData)} does not support writing '{options.Format}' format."); } } - SCEnvironmentRecord IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SCEnvironmentRecordData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeSCEnvironmentRecord(document.RootElement, options); + return DeserializeSCEnvironmentRecordData(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SCEnvironmentRecord)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SCEnvironmentRecordData)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCEnvironmentRecordData.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCEnvironmentRecordData.cs new file mode 100644 index 000000000000..455e205f1c80 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCEnvironmentRecordData.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.Confluent.Models; + +namespace Azure.ResourceManager.Confluent +{ + /// + /// A class representing the SCEnvironmentRecord data model. + /// Details about environment name, metadata and environment id of an environment + /// + public partial class SCEnvironmentRecordData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public SCEnvironmentRecordData() + { + } + + /// Initializes a new instance of . + /// Type of environment. + /// Id of the environment. + /// Type of the resource. + /// Display name of the environment. + /// Stream governance configuration. + /// Metadata of the record. + /// Keeps track of any properties unknown to the library. + internal SCEnvironmentRecordData(string kind, string id, string resourceType, string name, StreamGovernanceConfig streamGovernanceConfig, SCMetadataEntity metadata, IDictionary serializedAdditionalRawData) + { + Kind = kind; + Id = id; + ResourceType = resourceType; + Name = name; + StreamGovernanceConfig = streamGovernanceConfig; + Metadata = metadata; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Type of environment. + public string Kind { get; set; } + /// Id of the environment. + public string Id { get; set; } + /// Type of the resource. + public string ResourceType { get; set; } + /// Display name of the environment. + public string Name { get; set; } + /// Stream governance configuration. + internal StreamGovernanceConfig StreamGovernanceConfig { get; set; } + /// Stream governance configuration. + public Package? StreamGovernanceConfigPackage + { + get => StreamGovernanceConfig is null ? default : StreamGovernanceConfig.Package; + set + { + if (StreamGovernanceConfig is null) + StreamGovernanceConfig = new StreamGovernanceConfig(); + StreamGovernanceConfig.Package = value; + } + } + + /// Metadata of the record. + public SCMetadataEntity Metadata { get; set; } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCEnvironmentRecordResource.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCEnvironmentRecordResource.Serialization.cs new file mode 100644 index 000000000000..47c8f3faade8 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCEnvironmentRecordResource.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.Confluent +{ + public partial class SCEnvironmentRecordResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SCEnvironmentRecordData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + SCEnvironmentRecordData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCEnvironmentRecordResource.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCEnvironmentRecordResource.cs new file mode 100644 index 000000000000..97ae915ec522 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/SCEnvironmentRecordResource.cs @@ -0,0 +1,569 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Confluent.Models; + +namespace Azure.ResourceManager.Confluent +{ + /// + /// A Class representing a SCEnvironmentRecord along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetSCEnvironmentRecordResource method. + /// Otherwise you can get one from its parent resource using the GetSCEnvironmentRecord method. + /// + public partial class SCEnvironmentRecordResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The organizationName. + /// The environmentId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string environmentId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _scEnvironmentRecordOrganizationClientDiagnostics; + private readonly OrganizationRestOperations _scEnvironmentRecordOrganizationRestClient; + private readonly ClientDiagnostics _scEnvironmentRecordEnvironmentClientDiagnostics; + private readonly EnvironmentRestOperations _scEnvironmentRecordEnvironmentRestClient; + private readonly SCEnvironmentRecordData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Confluent/organizations/environments"; + + /// Initializes a new instance of the class for mocking. + protected SCEnvironmentRecordResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SCEnvironmentRecordResource(ArmClient client, SCEnvironmentRecordData data) : this(client, new ResourceIdentifier(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 SCEnvironmentRecordResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _scEnvironmentRecordOrganizationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Confluent", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string scEnvironmentRecordOrganizationApiVersion); + _scEnvironmentRecordOrganizationRestClient = new OrganizationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, scEnvironmentRecordOrganizationApiVersion); + _scEnvironmentRecordEnvironmentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Confluent", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string scEnvironmentRecordEnvironmentApiVersion); + _scEnvironmentRecordEnvironmentRestClient = new EnvironmentRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, scEnvironmentRecordEnvironmentApiVersion); +#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 SCEnvironmentRecordData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of SCClusterRecordResources in the SCEnvironmentRecord. + /// An object representing collection of SCClusterRecordResources and their operations over a SCClusterRecordResource. + public virtual SCClusterRecordCollection GetSCClusterRecords() + { + return GetCachedClient(client => new SCClusterRecordCollection(client, Id)); + } + + /// + /// Get cluster by Id + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId} + /// + /// + /// Operation Id + /// Organization_GetClusterById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent kafka or schema registry cluster id. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSCClusterRecordAsync(string clusterId, CancellationToken cancellationToken = default) + { + return await GetSCClusterRecords().GetAsync(clusterId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get cluster by Id + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId} + /// + /// + /// Operation Id + /// Organization_GetClusterById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent kafka or schema registry cluster id. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSCClusterRecord(string clusterId, CancellationToken cancellationToken = default) + { + return GetSCClusterRecords().Get(clusterId, cancellationToken); + } + + /// + /// Get Environment details by environment Id + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId} + /// + /// + /// Operation Id + /// Organization_GetEnvironmentById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _scEnvironmentRecordOrganizationClientDiagnostics.CreateScope("SCEnvironmentRecordResource.Get"); + scope.Start(); + try + { + var response = await _scEnvironmentRecordOrganizationRestClient.GetEnvironmentByIdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SCEnvironmentRecordResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Environment details by environment Id + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId} + /// + /// + /// Operation Id + /// Organization_GetEnvironmentById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _scEnvironmentRecordOrganizationClientDiagnostics.CreateScope("SCEnvironmentRecordResource.Get"); + scope.Start(); + try + { + var response = _scEnvironmentRecordOrganizationRestClient.GetEnvironmentById(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SCEnvironmentRecordResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete confluent environment by id + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId} + /// + /// + /// Operation Id + /// Environment_Delete + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _scEnvironmentRecordEnvironmentClientDiagnostics.CreateScope("SCEnvironmentRecordResource.Delete"); + scope.Start(); + try + { + var response = await _scEnvironmentRecordEnvironmentRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ConfluentArmOperation(_scEnvironmentRecordEnvironmentClientDiagnostics, Pipeline, _scEnvironmentRecordEnvironmentRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete confluent environment by id + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId} + /// + /// + /// Operation Id + /// Environment_Delete + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _scEnvironmentRecordEnvironmentClientDiagnostics.CreateScope("SCEnvironmentRecordResource.Delete"); + scope.Start(); + try + { + var response = _scEnvironmentRecordEnvironmentRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new ConfluentArmOperation(_scEnvironmentRecordEnvironmentClientDiagnostics, Pipeline, _scEnvironmentRecordEnvironmentRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create confluent environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId} + /// + /// + /// Operation Id + /// Environment_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Confluent Environment resource model. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, SCEnvironmentRecordData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _scEnvironmentRecordEnvironmentClientDiagnostics.CreateScope("SCEnvironmentRecordResource.Update"); + scope.Start(); + try + { + var response = await _scEnvironmentRecordEnvironmentRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _scEnvironmentRecordEnvironmentRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ConfluentArmOperation(Response.FromValue(new SCEnvironmentRecordResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create confluent environment + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId} + /// + /// + /// Operation Id + /// Environment_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Confluent Environment resource model. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, SCEnvironmentRecordData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _scEnvironmentRecordEnvironmentClientDiagnostics.CreateScope("SCEnvironmentRecordResource.Update"); + scope.Start(); + try + { + var response = _scEnvironmentRecordEnvironmentRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var uri = _scEnvironmentRecordEnvironmentRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ConfluentArmOperation(Response.FromValue(new SCEnvironmentRecordResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get schema registry clusters + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/schemaRegistryClusters + /// + /// + /// Operation Id + /// Organization_ListSchemaRegistryClusters + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Pagination size. + /// An opaque pagination token to fetch the next set of records. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSchemaRegistryClustersAsync(int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _scEnvironmentRecordOrganizationRestClient.CreateListSchemaRegistryClustersRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, pageSizeHint, pageToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _scEnvironmentRecordOrganizationRestClient.CreateListSchemaRegistryClustersNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, pageSizeHint, pageToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => SchemaRegistryClusterRecord.DeserializeSchemaRegistryClusterRecord(e), _scEnvironmentRecordOrganizationClientDiagnostics, Pipeline, "SCEnvironmentRecordResource.GetSchemaRegistryClusters", "value", "nextLink", cancellationToken); + } + + /// + /// Get schema registry clusters + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/schemaRegistryClusters + /// + /// + /// Operation Id + /// Organization_ListSchemaRegistryClusters + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Pagination size. + /// An opaque pagination token to fetch the next set of records. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSchemaRegistryClusters(int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _scEnvironmentRecordOrganizationRestClient.CreateListSchemaRegistryClustersRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, pageSizeHint, pageToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _scEnvironmentRecordOrganizationRestClient.CreateListSchemaRegistryClustersNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, pageSizeHint, pageToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => SchemaRegistryClusterRecord.DeserializeSchemaRegistryClusterRecord(e), _scEnvironmentRecordOrganizationClientDiagnostics, Pipeline, "SCEnvironmentRecordResource.GetSchemaRegistryClusters", "value", "nextLink", cancellationToken); + } + + /// + /// Get schema registry cluster by Id + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/schemaRegistryClusters/{clusterId} + /// + /// + /// Operation Id + /// Organization_GetSchemaRegistryClusterById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// + /// Confluent kafka or schema registry cluster id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetSchemaRegistryClusterAsync(string clusterId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + + using var scope = _scEnvironmentRecordOrganizationClientDiagnostics.CreateScope("SCEnvironmentRecordResource.GetSchemaRegistryCluster"); + scope.Start(); + try + { + var response = await _scEnvironmentRecordOrganizationRestClient.GetSchemaRegistryClusterByIdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, clusterId, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get schema registry cluster by Id + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/schemaRegistryClusters/{clusterId} + /// + /// + /// Operation Id + /// Organization_GetSchemaRegistryClusterById + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// + /// Confluent kafka or schema registry cluster id. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response GetSchemaRegistryCluster(string clusterId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(clusterId, nameof(clusterId)); + + using var scope = _scEnvironmentRecordOrganizationClientDiagnostics.CreateScope("SCEnvironmentRecordResource.GetSchemaRegistryCluster"); + scope.Start(); + try + { + var response = _scEnvironmentRecordOrganizationRestClient.GetSchemaRegistryClusterById(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, clusterId, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/TopicRecordCollection.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/TopicRecordCollection.cs new file mode 100644 index 000000000000..c0502e947d37 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/TopicRecordCollection.cs @@ -0,0 +1,501 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Confluent +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetTopicRecords method from an instance of . + /// + public partial class TopicRecordCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _topicRecordTopicsClientDiagnostics; + private readonly TopicsRestOperations _topicRecordTopicsRestClient; + + /// Initializes a new instance of the class for mocking. + protected TopicRecordCollection() + { + } + + /// 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 TopicRecordCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _topicRecordTopicsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Confluent", TopicRecordResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(TopicRecordResource.ResourceType, out string topicRecordTopicsApiVersion); + _topicRecordTopicsRestClient = new TopicsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, topicRecordTopicsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SCClusterRecordResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SCClusterRecordResource.ResourceType), nameof(id)); + } + + /// + /// Create confluent topics by Name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics/{topicName} + /// + /// + /// Operation Id + /// Topics_Create + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Confluent kafka or schema registry topic name. + /// Confluent Topics resource model. + /// 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 topicName, TopicRecordData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _topicRecordTopicsClientDiagnostics.CreateScope("TopicRecordCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _topicRecordTopicsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, topicName, data, cancellationToken).ConfigureAwait(false); + var uri = _topicRecordTopicsRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, topicName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ConfluentArmOperation(Response.FromValue(new TopicRecordResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create confluent topics by Name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics/{topicName} + /// + /// + /// Operation Id + /// Topics_Create + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Confluent kafka or schema registry topic name. + /// Confluent Topics resource model. + /// 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 topicName, TopicRecordData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _topicRecordTopicsClientDiagnostics.CreateScope("TopicRecordCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _topicRecordTopicsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, topicName, data, cancellationToken); + var uri = _topicRecordTopicsRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, topicName, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ConfluentArmOperation(Response.FromValue(new TopicRecordResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get confluent topic by Name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics/{topicName} + /// + /// + /// Operation Id + /// Topics_Get + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent kafka or schema registry topic name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string topicName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + + using var scope = _topicRecordTopicsClientDiagnostics.CreateScope("TopicRecordCollection.Get"); + scope.Start(); + try + { + var response = await _topicRecordTopicsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, topicName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new TopicRecordResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get confluent topic by Name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics/{topicName} + /// + /// + /// Operation Id + /// Topics_Get + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent kafka or schema registry topic name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string topicName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + + using var scope = _topicRecordTopicsClientDiagnostics.CreateScope("TopicRecordCollection.Get"); + scope.Start(); + try + { + var response = _topicRecordTopicsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, topicName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new TopicRecordResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists of all the topics in a clusters + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics + /// + /// + /// Operation Id + /// Topics_List + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Pagination size. + /// An opaque pagination token to fetch the next set of records. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _topicRecordTopicsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, pageSizeHint, pageToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _topicRecordTopicsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, pageSizeHint, pageToken); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new TopicRecordResource(Client, TopicRecordData.DeserializeTopicRecordData(e)), _topicRecordTopicsClientDiagnostics, Pipeline, "TopicRecordCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists of all the topics in a clusters + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics + /// + /// + /// Operation Id + /// Topics_List + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Pagination size. + /// An opaque pagination token to fetch the next set of records. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? pageSize = null, string pageToken = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _topicRecordTopicsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, pageSizeHint, pageToken); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _topicRecordTopicsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, pageSizeHint, pageToken); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new TopicRecordResource(Client, TopicRecordData.DeserializeTopicRecordData(e)), _topicRecordTopicsClientDiagnostics, Pipeline, "TopicRecordCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics/{topicName} + /// + /// + /// Operation Id + /// Topics_Get + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent kafka or schema registry topic name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string topicName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + + using var scope = _topicRecordTopicsClientDiagnostics.CreateScope("TopicRecordCollection.Exists"); + scope.Start(); + try + { + var response = await _topicRecordTopicsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, topicName, 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.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics/{topicName} + /// + /// + /// Operation Id + /// Topics_Get + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent kafka or schema registry topic name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string topicName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + + using var scope = _topicRecordTopicsClientDiagnostics.CreateScope("TopicRecordCollection.Exists"); + scope.Start(); + try + { + var response = _topicRecordTopicsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, topicName, 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.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics/{topicName} + /// + /// + /// Operation Id + /// Topics_Get + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent kafka or schema registry topic name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string topicName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + + using var scope = _topicRecordTopicsClientDiagnostics.CreateScope("TopicRecordCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _topicRecordTopicsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, topicName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new TopicRecordResource(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.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics/{topicName} + /// + /// + /// Operation Id + /// Topics_Get + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Confluent kafka or schema registry topic name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string topicName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(topicName, nameof(topicName)); + + using var scope = _topicRecordTopicsClientDiagnostics.CreateScope("TopicRecordCollection.GetIfExists"); + scope.Start(); + try + { + var response = _topicRecordTopicsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, topicName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new TopicRecordResource(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/confluent/Azure.ResourceManager.Confluent/src/Generated/TopicRecordData.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/TopicRecordData.Serialization.cs new file mode 100644 index 000000000000..a6d1eca96ba0 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/TopicRecordData.Serialization.cs @@ -0,0 +1,292 @@ +// 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.Confluent.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Confluent +{ + public partial class TopicRecordData : 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(TopicRecordData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } + if (Optional.IsDefined(TopicId)) + { + writer.WritePropertyName("topicId"u8); + writer.WriteStringValue(TopicId); + } + if (Optional.IsDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteObjectValue(Metadata, options); + } + if (Optional.IsDefined(Partitions)) + { + writer.WritePropertyName("partitions"u8); + writer.WriteObjectValue(Partitions, options); + } + if (Optional.IsDefined(Configs)) + { + writer.WritePropertyName("configs"u8); + writer.WriteObjectValue(Configs, options); + } + if (Optional.IsCollectionDefined(InputConfigs)) + { + writer.WritePropertyName("inputConfigs"u8); + writer.WriteStartArray(); + foreach (var item in InputConfigs) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(PartitionsReassignments)) + { + writer.WritePropertyName("partitionsReassignments"u8); + writer.WriteObjectValue(PartitionsReassignments, options); + } + if (Optional.IsDefined(PartitionsCount)) + { + writer.WritePropertyName("partitionsCount"u8); + writer.WriteStringValue(PartitionsCount); + } + if (Optional.IsDefined(ReplicationFactor)) + { + writer.WritePropertyName("replicationFactor"u8); + writer.WriteStringValue(ReplicationFactor); + } + writer.WriteEndObject(); + } + + TopicRecordData 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(TopicRecordData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTopicRecordData(document.RootElement, options); + } + + internal static TopicRecordData DeserializeTopicRecordData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string kind = default; + string topicId = default; + TopicMetadataEntity metadata = default; + TopicsRelatedLink partitions = default; + TopicsRelatedLink configs = default; + IList inputConfigs = default; + TopicsRelatedLink partitionsReassignments = default; + string partitionsCount = default; + string replicationFactor = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + 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 (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("kind"u8)) + { + kind = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("topicId"u8)) + { + topicId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("metadata"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + metadata = TopicMetadataEntity.DeserializeTopicMetadataEntity(property0.Value, options); + continue; + } + if (property0.NameEquals("partitions"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + partitions = TopicsRelatedLink.DeserializeTopicsRelatedLink(property0.Value, options); + continue; + } + if (property0.NameEquals("configs"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configs = TopicsRelatedLink.DeserializeTopicsRelatedLink(property0.Value, options); + continue; + } + if (property0.NameEquals("inputConfigs"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(TopicsInputConfig.DeserializeTopicsInputConfig(item, options)); + } + inputConfigs = array; + continue; + } + if (property0.NameEquals("partitionsReassignments"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + partitionsReassignments = TopicsRelatedLink.DeserializeTopicsRelatedLink(property0.Value, options); + continue; + } + if (property0.NameEquals("partitionsCount"u8)) + { + partitionsCount = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("replicationFactor"u8)) + { + replicationFactor = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TopicRecordData( + id, + name, + type, + systemData, + kind, + topicId, + metadata, + partitions, + configs, + inputConfigs ?? new ChangeTrackingList(), + partitionsReassignments, + partitionsCount, + replicationFactor, + 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(TopicRecordData)} does not support writing '{options.Format}' format."); + } + } + + TopicRecordData 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 DeserializeTopicRecordData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TopicRecordData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/TopicRecordData.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/TopicRecordData.cs new file mode 100644 index 000000000000..6b72e546e7cc --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/TopicRecordData.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Confluent.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Confluent +{ + /// + /// A class representing the TopicRecord data model. + /// Details of topic record + /// + public partial class TopicRecordData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public TopicRecordData() + { + InputConfigs = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Type of topic. + /// Topic Id returned by Confluent. + /// Metadata of the record. + /// Partition Specification of the topic. + /// Config Specification of the topic. + /// Input Config Specification of the topic. + /// Partition Reassignment Specification of the topic. + /// Partition count of the topic. + /// Replication factor of the topic. + /// Keeps track of any properties unknown to the library. + internal TopicRecordData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string kind, string topicId, TopicMetadataEntity metadata, TopicsRelatedLink partitions, TopicsRelatedLink configs, IList inputConfigs, TopicsRelatedLink partitionsReassignments, string partitionsCount, string replicationFactor, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Kind = kind; + TopicId = topicId; + Metadata = metadata; + Partitions = partitions; + Configs = configs; + InputConfigs = inputConfigs; + PartitionsReassignments = partitionsReassignments; + PartitionsCount = partitionsCount; + ReplicationFactor = replicationFactor; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Type of topic. + public string Kind { get; set; } + /// Topic Id returned by Confluent. + public string TopicId { get; set; } + /// Metadata of the record. + public TopicMetadataEntity Metadata { get; set; } + /// Partition Specification of the topic. + internal TopicsRelatedLink Partitions { get; set; } + /// Relationship of the topic. + public string PartitionsRelated + { + get => Partitions is null ? default : Partitions.Related; + set + { + if (Partitions is null) + Partitions = new TopicsRelatedLink(); + Partitions.Related = value; + } + } + + /// Config Specification of the topic. + internal TopicsRelatedLink Configs { get; set; } + /// Relationship of the topic. + public string ConfigsRelated + { + get => Configs is null ? default : Configs.Related; + set + { + if (Configs is null) + Configs = new TopicsRelatedLink(); + Configs.Related = value; + } + } + + /// Input Config Specification of the topic. + public IList InputConfigs { get; } + /// Partition Reassignment Specification of the topic. + internal TopicsRelatedLink PartitionsReassignments { get; set; } + /// Relationship of the topic. + public string PartitionsReassignmentsRelated + { + get => PartitionsReassignments is null ? default : PartitionsReassignments.Related; + set + { + if (PartitionsReassignments is null) + PartitionsReassignments = new TopicsRelatedLink(); + PartitionsReassignments.Related = value; + } + } + + /// Partition count of the topic. + public string PartitionsCount { get; set; } + /// Replication factor of the topic. + public string ReplicationFactor { get; set; } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/TopicRecordResource.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/TopicRecordResource.Serialization.cs new file mode 100644 index 000000000000..cf5349095b4e --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/TopicRecordResource.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.Confluent +{ + public partial class TopicRecordResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + TopicRecordData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + TopicRecordData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/TopicRecordResource.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/TopicRecordResource.cs new file mode 100644 index 000000000000..9b4695c88d51 --- /dev/null +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/TopicRecordResource.cs @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Confluent +{ + /// + /// A Class representing a TopicRecord along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetTopicRecordResource method. + /// Otherwise you can get one from its parent resource using the GetTopicRecord method. + /// + public partial class TopicRecordResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The organizationName. + /// The environmentId. + /// The clusterId. + /// The topicName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName, string environmentId, string clusterId, string topicName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics/{topicName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _topicRecordTopicsClientDiagnostics; + private readonly TopicsRestOperations _topicRecordTopicsRestClient; + private readonly TopicRecordData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Confluent/organizations/environments/clusters/topics"; + + /// Initializes a new instance of the class for mocking. + protected TopicRecordResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal TopicRecordResource(ArmClient client, TopicRecordData 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 TopicRecordResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _topicRecordTopicsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Confluent", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string topicRecordTopicsApiVersion); + _topicRecordTopicsRestClient = new TopicsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, topicRecordTopicsApiVersion); +#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 TopicRecordData 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 confluent topic by Name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics/{topicName} + /// + /// + /// Operation Id + /// Topics_Get + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _topicRecordTopicsClientDiagnostics.CreateScope("TopicRecordResource.Get"); + scope.Start(); + try + { + var response = await _topicRecordTopicsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new TopicRecordResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get confluent topic by Name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics/{topicName} + /// + /// + /// Operation Id + /// Topics_Get + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _topicRecordTopicsClientDiagnostics.CreateScope("TopicRecordResource.Get"); + scope.Start(); + try + { + var response = _topicRecordTopicsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new TopicRecordResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete confluent topic by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics/{topicName} + /// + /// + /// Operation Id + /// Topics_Delete + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _topicRecordTopicsClientDiagnostics.CreateScope("TopicRecordResource.Delete"); + scope.Start(); + try + { + var response = await _topicRecordTopicsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ConfluentArmOperation(_topicRecordTopicsClientDiagnostics, Pipeline, _topicRecordTopicsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete confluent topic by name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics/{topicName} + /// + /// + /// Operation Id + /// Topics_Delete + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _topicRecordTopicsClientDiagnostics.CreateScope("TopicRecordResource.Delete"); + scope.Start(); + try + { + var response = _topicRecordTopicsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new ConfluentArmOperation(_topicRecordTopicsClientDiagnostics, Pipeline, _topicRecordTopicsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create confluent topics by Name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics/{topicName} + /// + /// + /// Operation Id + /// Topics_Create + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Confluent Topics resource model. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, TopicRecordData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _topicRecordTopicsClientDiagnostics.CreateScope("TopicRecordResource.Update"); + scope.Start(); + try + { + var response = await _topicRecordTopicsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var uri = _topicRecordTopicsRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ConfluentArmOperation(Response.FromValue(new TopicRecordResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create confluent topics by Name + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/topics/{topicName} + /// + /// + /// Operation Id + /// Topics_Create + /// + /// + /// Default Api Version + /// 2024-07-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Confluent Topics resource model. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, TopicRecordData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _topicRecordTopicsClientDiagnostics.CreateScope("TopicRecordResource.Update"); + scope.Start(); + try + { + var response = _topicRecordTopicsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var uri = _topicRecordTopicsRestClient.CreateCreateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ConfluentArmOperation(Response.FromValue(new TopicRecordResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/autorest.md b/sdk/confluent/Azure.ResourceManager.Confluent/src/autorest.md index 52f1dd650cba..12e28716b73b 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/autorest.md +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: Confluent namespace: Azure.ResourceManager.Confluent -require: https://github.com/Azure/azure-rest-api-specs/blob/fca48bec19cc5aab0a45c0769bfca0f667164dbf/specification/confluent/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/confluent/resource-manager/readme.md #tag: package-2024-02 output-folder: $(this-folder)/Generated clear-output-folder: true diff --git a/sdk/confluent/ci.mgmt.yml b/sdk/confluent/ci.mgmt.yml index 12d37aa41bd2..757508d306f9 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 a9d0db85cf82..f8990a206c45 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 6b0ebe2b2fa7..ccda85ce5789 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 7715d499fa59..69564e2f1920 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 0b4d90bf6d1c..865705313c2c 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 0a036386143b..98ade1bcf8c6 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 e3f0cfb5bfa5..5fa9fce02790 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 9eb58047b02e..8eb615e701f7 100644 --- a/sdk/containerservice/ci.mgmt.yml +++ b/sdk/containerservice/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/containerservice/ci.mgmt.yml - sdk/containerservice/Azure.ResourceManager.ContainerService/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/containerservice/ci.mgmt.yml + - sdk/containerservice/Azure.ResourceManager.ContainerService/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/cosmosdb/ci.mgmt.yml b/sdk/cosmosdb/ci.mgmt.yml index 1eab24b3bbf9..ac1fce954c2a 100644 --- a/sdk/cosmosdb/ci.mgmt.yml +++ b/sdk/cosmosdb/ci.mgmt.yml @@ -2,6 +2,7 @@ # This file is generated automatically and any changes will be lost. trigger: none + pr: branches: include: @@ -14,6 +15,18 @@ pr: - sdk/cosmosdb/ci.mgmt.yml - sdk/cosmosdb/Azure.ResourceManager.CosmosDB/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/cosmosdb/ci.mgmt.yml + - sdk/cosmosdb/Azure.ResourceManager.CosmosDB/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/cosmosdbforpostgresql/ci.mgmt.yml b/sdk/cosmosdbforpostgresql/ci.mgmt.yml index ef6098c3999f..bfe2761181a8 100644 --- a/sdk/cosmosdbforpostgresql/ci.mgmt.yml +++ b/sdk/cosmosdbforpostgresql/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/cosmosdbforpostgresql/ci.mgmt.yml - sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/cosmosdbforpostgresql/ci.mgmt.yml + - sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/costmanagement/ci.mgmt.yml b/sdk/costmanagement/ci.mgmt.yml index e59280ba6be2..cee9459831fb 100644 --- a/sdk/costmanagement/ci.mgmt.yml +++ b/sdk/costmanagement/ci.mgmt.yml @@ -2,6 +2,7 @@ # This file is generated automatically and any changes will be lost. trigger: none + pr: branches: include: @@ -14,6 +15,18 @@ pr: - sdk/costmanagement/ci.mgmt.yml - sdk/costmanagement/Azure.ResourceManager.CostManagement/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/costmanagement/ci.mgmt.yml + - sdk/costmanagement/Azure.ResourceManager.CostManagement/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/customer-insights/ci.mgmt.yml b/sdk/customer-insights/ci.mgmt.yml index 124af418dcfa..a5d4f1a60cb5 100644 --- a/sdk/customer-insights/ci.mgmt.yml +++ b/sdk/customer-insights/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/customer-insights/ci.mgmt.yml - sdk/customer-insights/Azure.ResourceManager.CustomerInsights/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/customer-insights/ci.mgmt.yml + - sdk/customer-insights/Azure.ResourceManager.CustomerInsights/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/databox/ci.mgmt.yml b/sdk/databox/ci.mgmt.yml index edd63a701700..6525b0b436cc 100644 --- a/sdk/databox/ci.mgmt.yml +++ b/sdk/databox/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/databox/ci.mgmt.yml - sdk/databox/Azure.ResourceManager.DataBox/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/databox/ci.mgmt.yml + - sdk/databox/Azure.ResourceManager.DataBox/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/databoxedge/ci.mgmt.yml b/sdk/databoxedge/ci.mgmt.yml index 29e3b1537c78..3cf952bd82f3 100644 --- a/sdk/databoxedge/ci.mgmt.yml +++ b/sdk/databoxedge/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/databoxedge/ci.mgmt.yml - sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/databoxedge/ci.mgmt.yml + - sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/datadog/ci.mgmt.yml b/sdk/datadog/ci.mgmt.yml index 9e9d6825d8b0..c1b66f6edb09 100644 --- a/sdk/datadog/ci.mgmt.yml +++ b/sdk/datadog/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/datadog/ci.mgmt.yml - sdk/datadog/Azure.ResourceManager.Datadog/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/datadog/ci.mgmt.yml + - sdk/datadog/Azure.ResourceManager.Datadog/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/datafactory/ci.mgmt.yml b/sdk/datafactory/ci.mgmt.yml index 85d246a5d4e7..1f1a4ba295cd 100644 --- a/sdk/datafactory/ci.mgmt.yml +++ b/sdk/datafactory/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/datafactory/ci.mgmt.yml - sdk/datafactory/Azure.ResourceManager.DataFactory/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/datafactory/ci.mgmt.yml + - sdk/datafactory/Azure.ResourceManager.DataFactory/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/datalake-analytics/ci.mgmt.yml b/sdk/datalake-analytics/ci.mgmt.yml index b8794cd18f9e..44823b2f9444 100644 --- a/sdk/datalake-analytics/ci.mgmt.yml +++ b/sdk/datalake-analytics/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/datalake-analytics/ci.mgmt.yml - sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/datalake-analytics/ci.mgmt.yml + - sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/datalake-store/ci.mgmt.yml b/sdk/datalake-store/ci.mgmt.yml index 469839fd3024..27295ad1c28c 100644 --- a/sdk/datalake-store/ci.mgmt.yml +++ b/sdk/datalake-store/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/datalake-store/ci.mgmt.yml - sdk/datalake-store/Azure.ResourceManager.DataLakeStore/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/datalake-store/ci.mgmt.yml + - sdk/datalake-store/Azure.ResourceManager.DataLakeStore/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/datamigration/ci.mgmt.yml b/sdk/datamigration/ci.mgmt.yml index 1e64024fed17..f26452e1de48 100644 --- a/sdk/datamigration/ci.mgmt.yml +++ b/sdk/datamigration/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/datamigration/ci.mgmt.yml - sdk/datamigration/Azure.ResourceManager.DataMigration/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/datamigration/ci.mgmt.yml + - sdk/datamigration/Azure.ResourceManager.DataMigration/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/dataprotection/ci.mgmt.yml b/sdk/dataprotection/ci.mgmt.yml index 25637090aedb..0b74e9436cc7 100644 --- a/sdk/dataprotection/ci.mgmt.yml +++ b/sdk/dataprotection/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/dataprotection/ci.mgmt.yml - sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/dataprotection/ci.mgmt.yml + - sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/datashare/ci.mgmt.yml b/sdk/datashare/ci.mgmt.yml index f6dd41e0f37f..dcb3801e3f58 100644 --- a/sdk/datashare/ci.mgmt.yml +++ b/sdk/datashare/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/datashare/ci.mgmt.yml - sdk/datashare/Azure.ResourceManager.DataShare/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/datashare/ci.mgmt.yml + - sdk/datashare/Azure.ResourceManager.DataShare/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/defendereasm/ci.mgmt.yml b/sdk/defendereasm/ci.mgmt.yml index dd90e5a46690..2dc5c04ec007 100644 --- a/sdk/defendereasm/ci.mgmt.yml +++ b/sdk/defendereasm/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/defendereasm/ci.mgmt.yml - sdk/defendereasm/Azure.ResourceManager.DefenderEasm/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/defendereasm/ci.mgmt.yml + - sdk/defendereasm/Azure.ResourceManager.DefenderEasm/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/desktopvirtualization/ci.mgmt.yml b/sdk/desktopvirtualization/ci.mgmt.yml index 3d6f40025c77..b6af32cc15c3 100644 --- a/sdk/desktopvirtualization/ci.mgmt.yml +++ b/sdk/desktopvirtualization/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/desktopvirtualization/ci.mgmt.yml - sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/desktopvirtualization/ci.mgmt.yml + - sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/devcenter/ci.mgmt.yml b/sdk/devcenter/ci.mgmt.yml index 136d77bbba6d..cfa8320239dd 100644 --- a/sdk/devcenter/ci.mgmt.yml +++ b/sdk/devcenter/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/devcenter/ci.mgmt.yml - sdk/devcenter/Azure.ResourceManager.DevCenter/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/devcenter/ci.mgmt.yml + - sdk/devcenter/Azure.ResourceManager.DevCenter/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/deviceprovisioningservices/ci.mgmt.yml b/sdk/deviceprovisioningservices/ci.mgmt.yml index f9c94973a324..733989d927dc 100644 --- a/sdk/deviceprovisioningservices/ci.mgmt.yml +++ b/sdk/deviceprovisioningservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/deviceprovisioningservices/ci.mgmt.yml - sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/deviceprovisioningservices/ci.mgmt.yml + - sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/deviceregistry/ci.mgmt.yml b/sdk/deviceregistry/ci.mgmt.yml index 05fffe301114..271e718d8676 100644 --- a/sdk/deviceregistry/ci.mgmt.yml +++ b/sdk/deviceregistry/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/deviceregistry/ci.mgmt.yml - sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/deviceregistry/ci.mgmt.yml + - sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/deviceupdate/ci.mgmt.yml b/sdk/deviceupdate/ci.mgmt.yml index c1315e462bb9..d8abd00a2256 100644 --- a/sdk/deviceupdate/ci.mgmt.yml +++ b/sdk/deviceupdate/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/deviceupdate/ci.mgmt.yml - sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/deviceupdate/ci.mgmt.yml + - sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/devopsinfrastructure/ci.mgmt.yml b/sdk/devopsinfrastructure/ci.mgmt.yml index 0f2db1225cf0..8e463b9f3794 100644 --- a/sdk/devopsinfrastructure/ci.mgmt.yml +++ b/sdk/devopsinfrastructure/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/devopsinfrastructure/ci.mgmt.yml - sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/devopsinfrastructure/ci.mgmt.yml + - sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/devspaces/ci.mgmt.yml b/sdk/devspaces/ci.mgmt.yml index b63234a64555..248d3c3143f0 100644 --- a/sdk/devspaces/ci.mgmt.yml +++ b/sdk/devspaces/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/devspaces/ci.mgmt.yml - sdk/devspaces/Azure.ResourceManager.DevSpaces/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/devspaces/ci.mgmt.yml + - sdk/devspaces/Azure.ResourceManager.DevSpaces/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/devtestlabs/ci.mgmt.yml b/sdk/devtestlabs/ci.mgmt.yml index 1946409a6b75..7ee994de378b 100644 --- a/sdk/devtestlabs/ci.mgmt.yml +++ b/sdk/devtestlabs/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/devtestlabs/ci.mgmt.yml - sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/devtestlabs/ci.mgmt.yml + - sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/digitaltwins/ci.mgmt.yml b/sdk/digitaltwins/ci.mgmt.yml index a0e8233a36cf..a8766e215b7c 100644 --- a/sdk/digitaltwins/ci.mgmt.yml +++ b/sdk/digitaltwins/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/digitaltwins/ci.mgmt.yml - sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/digitaltwins/ci.mgmt.yml + - sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/dns/ci.mgmt.yml b/sdk/dns/ci.mgmt.yml index 8357809b4e6f..ec6edfb21775 100644 --- a/sdk/dns/ci.mgmt.yml +++ b/sdk/dns/ci.mgmt.yml @@ -2,6 +2,7 @@ # This file is generated automatically and any changes will be lost. trigger: none + pr: branches: include: @@ -14,6 +15,18 @@ pr: - sdk/dns/ci.mgmt.yml - sdk/dns/Azure.ResourceManager.Dns/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/dns/ci.mgmt.yml + - sdk/dns/Azure.ResourceManager.Dns/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/dnsresolver/ci.mgmt.yml b/sdk/dnsresolver/ci.mgmt.yml index afa270cdc600..6b2569c11c49 100644 --- a/sdk/dnsresolver/ci.mgmt.yml +++ b/sdk/dnsresolver/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/dnsresolver/ci.mgmt.yml - sdk/dnsresolver/Azure.ResourceManager.DnsResolver/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/dnsresolver/ci.mgmt.yml + - sdk/dnsresolver/Azure.ResourceManager.DnsResolver/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/dynatrace/ci.mgmt.yml b/sdk/dynatrace/ci.mgmt.yml index f76bf3a316af..fe97a3c1f612 100644 --- a/sdk/dynatrace/ci.mgmt.yml +++ b/sdk/dynatrace/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/dynatrace/ci.mgmt.yml - sdk/dynatrace/Azure.ResourceManager.Dynatrace/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/dynatrace/ci.mgmt.yml + - sdk/dynatrace/Azure.ResourceManager.Dynatrace/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/edgeorder/ci.mgmt.yml b/sdk/edgeorder/ci.mgmt.yml index 4d1fbaa121f9..cb4d87c29a1b 100644 --- a/sdk/edgeorder/ci.mgmt.yml +++ b/sdk/edgeorder/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/edgeorder/ci.mgmt.yml - sdk/edgeorder/Azure.ResourceManager.EdgeOrder/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/edgeorder/ci.mgmt.yml + - sdk/edgeorder/Azure.ResourceManager.EdgeOrder/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/edgezones/ci.mgmt.yml b/sdk/edgezones/ci.mgmt.yml index 9dc8d79aab30..ebed00842581 100644 --- a/sdk/edgezones/ci.mgmt.yml +++ b/sdk/edgezones/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/edgezones/ci.mgmt.yml - sdk/edgezones/Azure.ResourceManager.EdgeZones/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/edgezones/ci.mgmt.yml + - sdk/edgezones/Azure.ResourceManager.EdgeZones/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/elastic/ci.mgmt.yml b/sdk/elastic/ci.mgmt.yml index 76ecd8b3923d..2e29070fce4a 100644 --- a/sdk/elastic/ci.mgmt.yml +++ b/sdk/elastic/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/elastic/ci.mgmt.yml - sdk/elastic/Azure.ResourceManager.Elastic/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/elastic/ci.mgmt.yml + - sdk/elastic/Azure.ResourceManager.Elastic/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/elasticsan/ci.mgmt.yml b/sdk/elasticsan/ci.mgmt.yml index 7e2bb35dde21..dba4416415e9 100644 --- a/sdk/elasticsan/ci.mgmt.yml +++ b/sdk/elasticsan/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/elasticsan/ci.mgmt.yml - sdk/elasticsan/Azure.ResourceManager.ElasticSan/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/elasticsan/ci.mgmt.yml + - sdk/elasticsan/Azure.ResourceManager.ElasticSan/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/eventgrid/ci.mgmt.yml b/sdk/eventgrid/ci.mgmt.yml index cb02a1b84e8b..1b2eaffc0fdd 100644 --- a/sdk/eventgrid/ci.mgmt.yml +++ b/sdk/eventgrid/ci.mgmt.yml @@ -2,6 +2,7 @@ # This is for Track 2 managment plane SDK trigger: none + pr: branches: include: @@ -14,6 +15,18 @@ pr: - sdk/eventgrid/ci.mgmt.yml - sdk/eventgrid/Azure.ResourceManager.EventGrid/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/eventgrid/ci.mgmt.yml + - sdk/eventgrid/Azure.ResourceManager.EventGrid/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/eventhub/ci.mgmt.yml b/sdk/eventhub/ci.mgmt.yml index b7c0045fffb3..dadda2db6dc5 100644 --- a/sdk/eventhub/ci.mgmt.yml +++ b/sdk/eventhub/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/eventhub/ci.mgmt.yml - sdk/eventhub/Azure.ResourceManager.EventHubs/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/eventhub/ci.mgmt.yml + - sdk/eventhub/Azure.ResourceManager.EventHubs/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/extendedlocation/ci.mgmt.yml b/sdk/extendedlocation/ci.mgmt.yml index 4fb53374be74..e9c6939e2b1d 100644 --- a/sdk/extendedlocation/ci.mgmt.yml +++ b/sdk/extendedlocation/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/extendedlocation/ci.mgmt.yml - sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/extendedlocation/ci.mgmt.yml + - sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/fabric/ci.mgmt.yml b/sdk/fabric/ci.mgmt.yml index d0bc6cea6eb9..5cc91d0c8722 100644 --- a/sdk/fabric/ci.mgmt.yml +++ b/sdk/fabric/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/fabric/ci.mgmt.yml - sdk/fabric/Azure.ResourceManager.Fabric/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/fabric/ci.mgmt.yml + - sdk/fabric/Azure.ResourceManager.Fabric/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/fleet/ci.mgmt.yml b/sdk/fleet/ci.mgmt.yml index 09a225882401..469d40cad619 100644 --- a/sdk/fleet/ci.mgmt.yml +++ b/sdk/fleet/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/fleet/ci.mgmt.yml - sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/fleet/ci.mgmt.yml + - sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/fluidrelay/ci.mgmt.yml b/sdk/fluidrelay/ci.mgmt.yml index d43dfe94d729..1673db3a9f26 100644 --- a/sdk/fluidrelay/ci.mgmt.yml +++ b/sdk/fluidrelay/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/fluidrelay/ci.mgmt.yml - sdk/fluidrelay/Azure.ResourceManager.FluidRelay/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/fluidrelay/ci.mgmt.yml + - sdk/fluidrelay/Azure.ResourceManager.FluidRelay/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/frontdoor/ci.mgmt.yml b/sdk/frontdoor/ci.mgmt.yml index bff9dbcae78c..f19923a1b43d 100644 --- a/sdk/frontdoor/ci.mgmt.yml +++ b/sdk/frontdoor/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/frontdoor/ci.mgmt.yml - sdk/frontdoor/Azure.ResourceManager.FrontDoor/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/frontdoor/ci.mgmt.yml + - sdk/frontdoor/Azure.ResourceManager.FrontDoor/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/grafana/ci.mgmt.yml b/sdk/grafana/ci.mgmt.yml index a2f22e6ee33b..848173351b4d 100644 --- a/sdk/grafana/ci.mgmt.yml +++ b/sdk/grafana/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/grafana/ci.mgmt.yml - sdk/grafana/Azure.ResourceManager.Grafana/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/grafana/ci.mgmt.yml + - sdk/grafana/Azure.ResourceManager.Grafana/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/graphservices/ci.mgmt.yml b/sdk/graphservices/ci.mgmt.yml index 717a9a4a1963..ccd14b614b43 100644 --- a/sdk/graphservices/ci.mgmt.yml +++ b/sdk/graphservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/graphservices/ci.mgmt.yml - sdk/graphservices/Azure.ResourceManager.GraphServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/graphservices/ci.mgmt.yml + - sdk/graphservices/Azure.ResourceManager.GraphServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/guestconfiguration/ci.mgmt.yml b/sdk/guestconfiguration/ci.mgmt.yml index 5ebc59550f58..c2d2526d488b 100644 --- a/sdk/guestconfiguration/ci.mgmt.yml +++ b/sdk/guestconfiguration/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/guestconfiguration/ci.mgmt.yml - sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/guestconfiguration/ci.mgmt.yml + - sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hardwaresecuritymodules/ci.mgmt.yml b/sdk/hardwaresecuritymodules/ci.mgmt.yml index 21778711f99e..d94eea966253 100644 --- a/sdk/hardwaresecuritymodules/ci.mgmt.yml +++ b/sdk/hardwaresecuritymodules/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hardwaresecuritymodules/ci.mgmt.yml - sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hardwaresecuritymodules/ci.mgmt.yml + - sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hdinsight/ci.mgmt.yml b/sdk/hdinsight/ci.mgmt.yml index 4df0a02f5c80..29d3b404c76a 100644 --- a/sdk/hdinsight/ci.mgmt.yml +++ b/sdk/hdinsight/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hdinsight/ci.mgmt.yml - sdk/hdinsight/Azure.ResourceManager.HDInsight/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hdinsight/ci.mgmt.yml + - sdk/hdinsight/Azure.ResourceManager.HDInsight/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hdinsightcontainers/ci.mgmt.yml b/sdk/hdinsightcontainers/ci.mgmt.yml index 69a7566e0caa..66a879d8fbcd 100644 --- a/sdk/hdinsightcontainers/ci.mgmt.yml +++ b/sdk/hdinsightcontainers/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hdinsightcontainers/ci.mgmt.yml - sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hdinsightcontainers/ci.mgmt.yml + - sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/healthbot/ci.mgmt.yml b/sdk/healthbot/ci.mgmt.yml index 14bfc7f855e6..4c2698659502 100644 --- a/sdk/healthbot/ci.mgmt.yml +++ b/sdk/healthbot/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/healthbot/ci.mgmt.yml - sdk/healthbot/Azure.ResourceManager.HealthBot/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/healthbot/ci.mgmt.yml + - sdk/healthbot/Azure.ResourceManager.HealthBot/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/healthcareapis/ci.mgmt.yml b/sdk/healthcareapis/ci.mgmt.yml index 57030df35e56..6f02ac8fd023 100644 --- a/sdk/healthcareapis/ci.mgmt.yml +++ b/sdk/healthcareapis/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/healthcareapis/ci.mgmt.yml - sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/healthcareapis/ci.mgmt.yml + - sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/healthdataaiservices/ci.mgmt.yml b/sdk/healthdataaiservices/ci.mgmt.yml index 016a917c1e19..45857afa5722 100644 --- a/sdk/healthdataaiservices/ci.mgmt.yml +++ b/sdk/healthdataaiservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/healthdataaiservices/ci.mgmt.yml - sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/healthdataaiservices/ci.mgmt.yml + - sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hybridaks/ci.mgmt.yml b/sdk/hybridaks/ci.mgmt.yml index 552eb3298d3a..af3d82703d11 100644 --- a/sdk/hybridaks/ci.mgmt.yml +++ b/sdk/hybridaks/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hybridaks/ci.mgmt.yml - sdk/hybridaks/Azure.ResourceManager.HybridContainerService/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hybridaks/ci.mgmt.yml + - sdk/hybridaks/Azure.ResourceManager.HybridContainerService/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hybridcompute/ci.mgmt.yml b/sdk/hybridcompute/ci.mgmt.yml index d163a966512d..15f8656c399e 100644 --- a/sdk/hybridcompute/ci.mgmt.yml +++ b/sdk/hybridcompute/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hybridcompute/ci.mgmt.yml - sdk/hybridcompute/Azure.ResourceManager.HybridCompute/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hybridcompute/ci.mgmt.yml + - sdk/hybridcompute/Azure.ResourceManager.HybridCompute/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hybridconnectivity/ci.mgmt.yml b/sdk/hybridconnectivity/ci.mgmt.yml index 9ccca42ef557..8d809d4d9633 100644 --- a/sdk/hybridconnectivity/ci.mgmt.yml +++ b/sdk/hybridconnectivity/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hybridconnectivity/ci.mgmt.yml - sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hybridconnectivity/ci.mgmt.yml + - sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hybridkubernetes/ci.mgmt.yml b/sdk/hybridkubernetes/ci.mgmt.yml index fff768430c9d..bb98635a8e1c 100644 --- a/sdk/hybridkubernetes/ci.mgmt.yml +++ b/sdk/hybridkubernetes/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hybridkubernetes/ci.mgmt.yml - sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hybridkubernetes/ci.mgmt.yml + - sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/hybridnetwork/ci.mgmt.yml b/sdk/hybridnetwork/ci.mgmt.yml index 35f71f8ae870..39412ff81f05 100644 --- a/sdk/hybridnetwork/ci.mgmt.yml +++ b/sdk/hybridnetwork/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/hybridnetwork/ci.mgmt.yml - sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/hybridnetwork/ci.mgmt.yml + - sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/informaticadatamanagement/ci.mgmt.yml b/sdk/informaticadatamanagement/ci.mgmt.yml index 03013cc9c90b..82d3bafd3f7f 100644 --- a/sdk/informaticadatamanagement/ci.mgmt.yml +++ b/sdk/informaticadatamanagement/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/informaticadatamanagement/ci.mgmt.yml - sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/informaticadatamanagement/ci.mgmt.yml + - sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/iot/ci.mgmt.yml b/sdk/iot/ci.mgmt.yml index 6260cd0d71f2..199578b03331 100644 --- a/sdk/iot/ci.mgmt.yml +++ b/sdk/iot/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/iot/ci.mgmt.yml - sdk/iot/Azure.ResourceManager.IotFirmwareDefense/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/iot/ci.mgmt.yml + - sdk/iot/Azure.ResourceManager.IotFirmwareDefense/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/iotcentral/ci.mgmt.yml b/sdk/iotcentral/ci.mgmt.yml index 1702fd71c6dd..1225f99c37fd 100644 --- a/sdk/iotcentral/ci.mgmt.yml +++ b/sdk/iotcentral/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/iotcentral/ci.mgmt.yml - sdk/iotcentral/Azure.ResourceManager.IotCentral/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/iotcentral/ci.mgmt.yml + - sdk/iotcentral/Azure.ResourceManager.IotCentral/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/iothub/ci.mgmt.yml b/sdk/iothub/ci.mgmt.yml index 5eb9e999a89c..63fb10994eac 100644 --- a/sdk/iothub/ci.mgmt.yml +++ b/sdk/iothub/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/iothub/ci.mgmt.yml - sdk/iothub/Azure.ResourceManager.IotHub/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/iothub/ci.mgmt.yml + - sdk/iothub/Azure.ResourceManager.IotHub/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/keyvault/ci.mgmt.yml b/sdk/keyvault/ci.mgmt.yml index b48c2f8d4ff4..8ad905079a0a 100644 --- a/sdk/keyvault/ci.mgmt.yml +++ b/sdk/keyvault/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/keyvault/ci.mgmt.yml - sdk/keyvault/Azure.ResourceManager.KeyVault/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/keyvault/ci.mgmt.yml + - sdk/keyvault/Azure.ResourceManager.KeyVault/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/kubernetesconfiguration/ci.mgmt.yml b/sdk/kubernetesconfiguration/ci.mgmt.yml index 4249ef57fa6e..d3fb470a7b6e 100644 --- a/sdk/kubernetesconfiguration/ci.mgmt.yml +++ b/sdk/kubernetesconfiguration/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/kubernetesconfiguration/ci.mgmt.yml - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/kubernetesconfiguration/ci.mgmt.yml + - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/kusto/ci.mgmt.yml b/sdk/kusto/ci.mgmt.yml index 374cf1f0cb81..c410d1487d18 100644 --- a/sdk/kusto/ci.mgmt.yml +++ b/sdk/kusto/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/kusto/ci.mgmt.yml - sdk/kusto/Azure.ResourceManager.Kusto/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/kusto/ci.mgmt.yml + - sdk/kusto/Azure.ResourceManager.Kusto/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/labservices/ci.mgmt.yml b/sdk/labservices/ci.mgmt.yml index 48f80379ab14..f8a982072965 100644 --- a/sdk/labservices/ci.mgmt.yml +++ b/sdk/labservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/labservices/ci.mgmt.yml - sdk/labservices/Azure.ResourceManager.LabServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/labservices/ci.mgmt.yml + - sdk/labservices/Azure.ResourceManager.LabServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/loadtestservice/ci.mgmt.yml b/sdk/loadtestservice/ci.mgmt.yml index 4e3d99d42979..dfc32939e497 100644 --- a/sdk/loadtestservice/ci.mgmt.yml +++ b/sdk/loadtestservice/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/loadtestservice/ci.mgmt.yml - sdk/loadtestservice/Azure.ResourceManager.LoadTesting/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/loadtestservice/ci.mgmt.yml + - sdk/loadtestservice/Azure.ResourceManager.LoadTesting/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/logic/ci.mgmt.yml b/sdk/logic/ci.mgmt.yml index b89b224082ee..5bed51facd34 100644 --- a/sdk/logic/ci.mgmt.yml +++ b/sdk/logic/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/logic/ci.mgmt.yml - sdk/logic/Azure.ResourceManager.Logic/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/logic/ci.mgmt.yml + - sdk/logic/Azure.ResourceManager.Logic/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/machinelearningcompute/ci.mgmt.yml b/sdk/machinelearningcompute/ci.mgmt.yml index 9ea84fdf4d15..5ea619231191 100644 --- a/sdk/machinelearningcompute/ci.mgmt.yml +++ b/sdk/machinelearningcompute/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/machinelearningcompute/ci.mgmt.yml - sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/machinelearningcompute/ci.mgmt.yml + - sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/machinelearningservices/ci.mgmt.yml b/sdk/machinelearningservices/ci.mgmt.yml index 457299ab20b9..3a99ed224fc2 100644 --- a/sdk/machinelearningservices/ci.mgmt.yml +++ b/sdk/machinelearningservices/ci.mgmt.yml @@ -1,5 +1,6 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -12,6 +13,18 @@ pr: - sdk/machinelearningservices/ci.mgmt.yml - sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/machinelearningservices/ci.mgmt.yml + - sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/maintenance/ci.mgmt.yml b/sdk/maintenance/ci.mgmt.yml index c49cc1565d6d..94c552b69f26 100644 --- a/sdk/maintenance/ci.mgmt.yml +++ b/sdk/maintenance/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/maintenance/ci.mgmt.yml - sdk/maintenance/Azure.ResourceManager.Maintenance/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/maintenance/ci.mgmt.yml + - sdk/maintenance/Azure.ResourceManager.Maintenance/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/managednetwork/ci.mgmt.yml b/sdk/managednetwork/ci.mgmt.yml index 431d66d1245b..08c9f3d0ce55 100644 --- a/sdk/managednetwork/ci.mgmt.yml +++ b/sdk/managednetwork/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/managednetwork/ci.mgmt.yml - sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/managednetwork/ci.mgmt.yml + - sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/managednetworkfabric/ci.mgmt.yml b/sdk/managednetworkfabric/ci.mgmt.yml index aa6b571b04e2..3212ad45bbde 100644 --- a/sdk/managednetworkfabric/ci.mgmt.yml +++ b/sdk/managednetworkfabric/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/managednetworkfabric/ci.mgmt.yml - sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/managednetworkfabric/ci.mgmt.yml + - sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/managedserviceidentity/ci.mgmt.yml b/sdk/managedserviceidentity/ci.mgmt.yml index c8f3a187f918..c9cd4b0f235a 100644 --- a/sdk/managedserviceidentity/ci.mgmt.yml +++ b/sdk/managedserviceidentity/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/managedserviceidentity/ci.mgmt.yml - sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/managedserviceidentity/ci.mgmt.yml + - sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/ + extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/managedservices/ci.mgmt.yml b/sdk/managedservices/ci.mgmt.yml index d6c0ccd16eef..88360bb2defa 100644 --- a/sdk/managedservices/ci.mgmt.yml +++ b/sdk/managedservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/managedservices/ci.mgmt.yml - sdk/managedservices/Azure.ResourceManager.ManagedServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/managedservices/ci.mgmt.yml + - sdk/managedservices/Azure.ResourceManager.ManagedServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/managementpartner/ci.mgmt.yml b/sdk/managementpartner/ci.mgmt.yml index 52c8e762088e..6fdd0118e1b9 100644 --- a/sdk/managementpartner/ci.mgmt.yml +++ b/sdk/managementpartner/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/managementpartner/ci.mgmt.yml - sdk/managementpartner/Azure.ResourceManager.ManagementPartner/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/managementpartner/ci.mgmt.yml + - sdk/managementpartner/Azure.ResourceManager.ManagementPartner/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/maps/ci.mgmt.yml b/sdk/maps/ci.mgmt.yml index 2f16079cab2e..7ee4f1ddad3c 100644 --- a/sdk/maps/ci.mgmt.yml +++ b/sdk/maps/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/maps/ci.mgmt.yml - sdk/maps/Azure.ResourceManager.Maps/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/maps/ci.mgmt.yml + - sdk/maps/Azure.ResourceManager.Maps/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/marketplace/ci.mgmt.yml b/sdk/marketplace/ci.mgmt.yml index e6574bdb3039..42bc8a147b30 100644 --- a/sdk/marketplace/ci.mgmt.yml +++ b/sdk/marketplace/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/marketplace/ci.mgmt.yml - sdk/marketplace/Azure.ResourceManager.Marketplace/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/marketplace/ci.mgmt.yml + - sdk/marketplace/Azure.ResourceManager.Marketplace/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/marketplaceordering/ci.mgmt.yml b/sdk/marketplaceordering/ci.mgmt.yml index 2b1f8721902e..c602647fb32d 100644 --- a/sdk/marketplaceordering/ci.mgmt.yml +++ b/sdk/marketplaceordering/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/marketplaceordering/ci.mgmt.yml - sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/marketplaceordering/ci.mgmt.yml + - sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/mediaservices/ci.mgmt.yml b/sdk/mediaservices/ci.mgmt.yml index 55656f3ae48b..201ecc9d995d 100644 --- a/sdk/mediaservices/ci.mgmt.yml +++ b/sdk/mediaservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/mediaservices/ci.mgmt.yml - sdk/mediaservices/Azure.ResourceManager.Media/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/mediaservices/ci.mgmt.yml + - sdk/mediaservices/Azure.ResourceManager.Media/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/migrationdiscoverysap/ci.mgmt.yml b/sdk/migrationdiscoverysap/ci.mgmt.yml index f5eb354d28e7..26c079f3d6f5 100644 --- a/sdk/migrationdiscoverysap/ci.mgmt.yml +++ b/sdk/migrationdiscoverysap/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/migrationdiscoverysap/ci.mgmt.yml - sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/migrationdiscoverysap/ci.mgmt.yml + - sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/mixedreality/ci.mgmt.yml b/sdk/mixedreality/ci.mgmt.yml index 81c0c2744232..d342a10a32e0 100644 --- a/sdk/mixedreality/ci.mgmt.yml +++ b/sdk/mixedreality/ci.mgmt.yml @@ -1,5 +1,6 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -12,6 +13,18 @@ pr: - sdk/mixedreality/ci.mgmt.yml - sdk/mixedreality/Azure.ResourceManager.MixedReality/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/mixedreality/ci.mgmt.yml + - sdk/mixedreality/Azure.ResourceManager.MixedReality/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/mobilenetwork/ci.mgmt.yml b/sdk/mobilenetwork/ci.mgmt.yml index 8a68e6749ba7..325154bfbfb7 100644 --- a/sdk/mobilenetwork/ci.mgmt.yml +++ b/sdk/mobilenetwork/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/mobilenetwork/ci.mgmt.yml - sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/mobilenetwork/ci.mgmt.yml + - sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/ + extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/mongocluster/ci.mgmt.yml b/sdk/mongocluster/ci.mgmt.yml index d2eafe7877dd..10f6e93db8bc 100644 --- a/sdk/mongocluster/ci.mgmt.yml +++ b/sdk/mongocluster/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/mongocluster/ci.mgmt.yml - sdk/mongocluster/Azure.ResourceManager.MongoCluster/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/mongocluster/ci.mgmt.yml + - sdk/mongocluster/Azure.ResourceManager.MongoCluster/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/monitor/ci.mgmt.yml b/sdk/monitor/ci.mgmt.yml index 8beeded4e3b9..5933fd35d9e5 100644 --- a/sdk/monitor/ci.mgmt.yml +++ b/sdk/monitor/ci.mgmt.yml @@ -2,6 +2,7 @@ # This file is generated automatically and any changes will be lost. trigger: none + pr: branches: include: @@ -14,6 +15,18 @@ pr: - sdk/monitor/ci.mgmt.yml - sdk/monitor/Azure.ResourceManager.Monitor/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/monitor/ci.mgmt.yml + - sdk/monitor/Azure.ResourceManager.Monitor/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/mysql/ci.mgmt.yml b/sdk/mysql/ci.mgmt.yml index e1521b4ed568..2ba5627ae3fc 100644 --- a/sdk/mysql/ci.mgmt.yml +++ b/sdk/mysql/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/mysql/ci.mgmt.yml - sdk/mysql/Azure.ResourceManager.MySql/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/mysql/ci.mgmt.yml + - sdk/mysql/Azure.ResourceManager.MySql/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/neonpostgres/ci.mgmt.yml b/sdk/neonpostgres/ci.mgmt.yml index 72d449fc7a16..00f734ba7230 100644 --- a/sdk/neonpostgres/ci.mgmt.yml +++ b/sdk/neonpostgres/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/neonpostgres/ci.mgmt.yml - sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/neonpostgres/ci.mgmt.yml + - sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/netapp/ci.mgmt.yml b/sdk/netapp/ci.mgmt.yml index 05a683e910f5..5d0a3e741513 100644 --- a/sdk/netapp/ci.mgmt.yml +++ b/sdk/netapp/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/netapp/ci.mgmt.yml - sdk/netapp/Azure.ResourceManager.NetApp/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/netapp/ci.mgmt.yml + - sdk/netapp/Azure.ResourceManager.NetApp/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/network/ci.mgmt.yml b/sdk/network/ci.mgmt.yml index edf77de02a49..f69378e6c236 100644 --- a/sdk/network/ci.mgmt.yml +++ b/sdk/network/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/network/ci.mgmt.yml - sdk/network/Azure.ResourceManager.Network/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/network/ci.mgmt.yml + - sdk/network/Azure.ResourceManager.Network/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/networkanalytics/ci.mgmt.yml b/sdk/networkanalytics/ci.mgmt.yml index 9ece072ce867..52934a1bad24 100644 --- a/sdk/networkanalytics/ci.mgmt.yml +++ b/sdk/networkanalytics/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/networkanalytics/ci.mgmt.yml - sdk/networkanalytics/Azure.ResourceManager.NetworkAnalytics/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/networkanalytics/ci.mgmt.yml + - sdk/networkanalytics/Azure.ResourceManager.NetworkAnalytics/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/networkcloud/ci.mgmt.yml b/sdk/networkcloud/ci.mgmt.yml index f6c281af22a9..940f908b8c75 100644 --- a/sdk/networkcloud/ci.mgmt.yml +++ b/sdk/networkcloud/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/networkcloud/ci.mgmt.yml - sdk/networkcloud/Azure.ResourceManager.NetworkCloud/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/networkcloud/ci.mgmt.yml + - sdk/networkcloud/Azure.ResourceManager.NetworkCloud/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/networkfunction/ci.mgmt.yml b/sdk/networkfunction/ci.mgmt.yml index a3c743ef532a..b05cf6e5e1cc 100644 --- a/sdk/networkfunction/ci.mgmt.yml +++ b/sdk/networkfunction/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/networkfunction/ci.mgmt.yml - sdk/networkfunction/Azure.ResourceManager.NetworkFunction/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/networkfunction/ci.mgmt.yml + - sdk/networkfunction/Azure.ResourceManager.NetworkFunction/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/newrelicobservability/ci.mgmt.yml b/sdk/newrelicobservability/ci.mgmt.yml index d01ef74cd749..599cfd845f2c 100644 --- a/sdk/newrelicobservability/ci.mgmt.yml +++ b/sdk/newrelicobservability/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/newrelicobservability/ci.mgmt.yml - sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/newrelicobservability/ci.mgmt.yml + - sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/nginx/ci.mgmt.yml b/sdk/nginx/ci.mgmt.yml index f701b26a561a..39e047ce0015 100644 --- a/sdk/nginx/ci.mgmt.yml +++ b/sdk/nginx/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/nginx/ci.mgmt.yml - sdk/nginx/Azure.ResourceManager.Nginx/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/nginx/ci.mgmt.yml + - sdk/nginx/Azure.ResourceManager.Nginx/ + extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/notificationhubs/ci.mgmt.yml b/sdk/notificationhubs/ci.mgmt.yml index ba5a26631dd4..8d9f15f7758b 100644 --- a/sdk/notificationhubs/ci.mgmt.yml +++ b/sdk/notificationhubs/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/notificationhubs/ci.mgmt.yml - sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/notificationhubs/ci.mgmt.yml + - sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/openenergyplatform/ci.mgmt.yml b/sdk/openenergyplatform/ci.mgmt.yml index 1ab74128b4db..f2394b80f6b9 100644 --- a/sdk/openenergyplatform/ci.mgmt.yml +++ b/sdk/openenergyplatform/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/openenergyplatform/ci.mgmt.yml - sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/openenergyplatform/ci.mgmt.yml + - sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/ + extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/operationalinsights/ci.mgmt.yml b/sdk/operationalinsights/ci.mgmt.yml index d4c3b61dac40..9e588305c901 100644 --- a/sdk/operationalinsights/ci.mgmt.yml +++ b/sdk/operationalinsights/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/operationalinsights/ci.mgmt.yml - sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/operationalinsights/ci.mgmt.yml + - sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/oracle/ci.mgmt.yml b/sdk/oracle/ci.mgmt.yml index ccbd7c096ecf..760950dbd58a 100644 --- a/sdk/oracle/ci.mgmt.yml +++ b/sdk/oracle/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/oracle/ci.mgmt.yml - sdk/oracle/Azure.ResourceManager.OracleDatabase/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/oracle/ci.mgmt.yml + - sdk/oracle/Azure.ResourceManager.OracleDatabase/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/orbital/ci.mgmt.yml b/sdk/orbital/ci.mgmt.yml index 701576d2fa62..2b2102df1da3 100644 --- a/sdk/orbital/ci.mgmt.yml +++ b/sdk/orbital/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/orbital/ci.mgmt.yml - sdk/orbital/Azure.ResourceManager.Orbital/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/orbital/ci.mgmt.yml + - sdk/orbital/Azure.ResourceManager.Orbital/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/paloaltonetworks.ngfw/ci.mgmt.yml b/sdk/paloaltonetworks.ngfw/ci.mgmt.yml index 77dca48de9ef..6348d3109683 100644 --- a/sdk/paloaltonetworks.ngfw/ci.mgmt.yml +++ b/sdk/paloaltonetworks.ngfw/ci.mgmt.yml @@ -1,4 +1,5 @@ trigger: none + pr: branches: include: @@ -11,6 +12,18 @@ pr: - sdk/paloaltonetworks.ngfw/ci.mgmt.yml - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/paloaltonetworks.ngfw/ci.mgmt.yml + - sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/peering/ci.mgmt.yml b/sdk/peering/ci.mgmt.yml index 4d3d67e73949..cfef409531ee 100644 --- a/sdk/peering/ci.mgmt.yml +++ b/sdk/peering/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/peering/ci.mgmt.yml - sdk/peering/Azure.ResourceManager.Peering/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/peering/ci.mgmt.yml + - sdk/peering/Azure.ResourceManager.Peering/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/playwrighttesting/ci.mgmt.yml b/sdk/playwrighttesting/ci.mgmt.yml index 79addf69162c..b6422b373563 100644 --- a/sdk/playwrighttesting/ci.mgmt.yml +++ b/sdk/playwrighttesting/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/playwrighttesting/ci.mgmt.yml - sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/playwrighttesting/ci.mgmt.yml + - sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/policyinsights/ci.mgmt.yml b/sdk/policyinsights/ci.mgmt.yml index 56fa5c3ead85..c0fa9e7dd917 100644 --- a/sdk/policyinsights/ci.mgmt.yml +++ b/sdk/policyinsights/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/policyinsights/ci.mgmt.yml - sdk/policyinsights/Azure.ResourceManager.PolicyInsights/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/policyinsights/ci.mgmt.yml + - sdk/policyinsights/Azure.ResourceManager.PolicyInsights/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/postgresql/ci.mgmt.yml b/sdk/postgresql/ci.mgmt.yml index 77dbaed301ba..08dff06cd11f 100644 --- a/sdk/postgresql/ci.mgmt.yml +++ b/sdk/postgresql/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/postgresql/ci.mgmt.yml - sdk/postgresql/Azure.ResourceManager.PostgreSql/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/postgresql/ci.mgmt.yml + - sdk/postgresql/Azure.ResourceManager.PostgreSql/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/powerbidedicated/ci.mgmt.yml b/sdk/powerbidedicated/ci.mgmt.yml index 414f2b8ef0a9..951d3e8d0434 100644 --- a/sdk/powerbidedicated/ci.mgmt.yml +++ b/sdk/powerbidedicated/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/powerbidedicated/ci.mgmt.yml - sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/powerbidedicated/ci.mgmt.yml + - sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/privatedns/ci.mgmt.yml b/sdk/privatedns/ci.mgmt.yml index 86401f2f9675..31c567bfe408 100644 --- a/sdk/privatedns/ci.mgmt.yml +++ b/sdk/privatedns/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/privatedns/ci.mgmt.yml - sdk/privatedns/Azure.ResourceManager.PrivateDns/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/privatedns/ci.mgmt.yml + - sdk/privatedns/Azure.ResourceManager.PrivateDns/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/providerhub/ci.mgmt.yml b/sdk/providerhub/ci.mgmt.yml index 2c7f6ca61d3f..3de6a7f30b80 100644 --- a/sdk/providerhub/ci.mgmt.yml +++ b/sdk/providerhub/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/providerhub/ci.mgmt.yml - sdk/providerhub/Azure.ResourceManager.ProviderHub/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/providerhub/ci.mgmt.yml + - sdk/providerhub/Azure.ResourceManager.ProviderHub/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/purview/ci.mgmt.yml b/sdk/purview/ci.mgmt.yml index 226718ca583c..d5961aa8833a 100644 --- a/sdk/purview/ci.mgmt.yml +++ b/sdk/purview/ci.mgmt.yml @@ -1,5 +1,6 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -12,6 +13,18 @@ pr: - sdk/purview/ci.mgmt.yml - sdk/purview/Azure.ResourceManager.Purview/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/purview/ci.mgmt.yml + - sdk/purview/Azure.ResourceManager.Purview/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/quantum/ci.mgmt.yml b/sdk/quantum/ci.mgmt.yml index 8562320fa7c7..6ee02d7799bd 100644 --- a/sdk/quantum/ci.mgmt.yml +++ b/sdk/quantum/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/quantum/ci.mgmt.yml - sdk/quantum/Azure.ResourceManager.Quantum/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/quantum/ci.mgmt.yml + - sdk/quantum/Azure.ResourceManager.Quantum/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/qumulo/ci.mgmt.yml b/sdk/qumulo/ci.mgmt.yml index e89c4bea0e70..fe6e1fa253d3 100644 --- a/sdk/qumulo/ci.mgmt.yml +++ b/sdk/qumulo/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/qumulo/ci.mgmt.yml - sdk/qumulo/Azure.ResourceManager.Qumulo/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/qumulo/ci.mgmt.yml + - sdk/qumulo/Azure.ResourceManager.Qumulo/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/quota/ci.mgmt.yml b/sdk/quota/ci.mgmt.yml index f1f545ad13f1..9409730d342e 100644 --- a/sdk/quota/ci.mgmt.yml +++ b/sdk/quota/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/quota/ci.mgmt.yml - sdk/quota/Azure.ResourceManager.Quota/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/quota/ci.mgmt.yml + - sdk/quota/Azure.ResourceManager.Quota/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/recoveryservices-backup/ci.mgmt.yml b/sdk/recoveryservices-backup/ci.mgmt.yml index 5edfd823e3c0..402121c0f72c 100644 --- a/sdk/recoveryservices-backup/ci.mgmt.yml +++ b/sdk/recoveryservices-backup/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/recoveryservices-backup/ci.mgmt.yml - sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/recoveryservices-backup/ci.mgmt.yml + - sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/recoveryservices-datareplication/ci.mgmt.yml b/sdk/recoveryservices-datareplication/ci.mgmt.yml index 2e3966d67a88..143f2e0317c3 100644 --- a/sdk/recoveryservices-datareplication/ci.mgmt.yml +++ b/sdk/recoveryservices-datareplication/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/recoveryservices-datareplication/ci.mgmt.yml - sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/recoveryservices-datareplication/ci.mgmt.yml + - sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/recoveryservices-siterecovery/ci.mgmt.yml b/sdk/recoveryservices-siterecovery/ci.mgmt.yml index bded800f3ee2..3a8a3179d5a5 100644 --- a/sdk/recoveryservices-siterecovery/ci.mgmt.yml +++ b/sdk/recoveryservices-siterecovery/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/recoveryservices-siterecovery/ci.mgmt.yml - sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/recoveryservices-siterecovery/ci.mgmt.yml + - sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/recoveryservices/ci.mgmt.yml b/sdk/recoveryservices/ci.mgmt.yml index 0e7e6985f21c..d4a5e482dfa7 100644 --- a/sdk/recoveryservices/ci.mgmt.yml +++ b/sdk/recoveryservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/recoveryservices/ci.mgmt.yml - sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/recoveryservices/ci.mgmt.yml + - sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/redis/ci.mgmt.yml b/sdk/redis/ci.mgmt.yml index 9e6845322580..dfc71e356b87 100644 --- a/sdk/redis/ci.mgmt.yml +++ b/sdk/redis/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/redis/ci.mgmt.yml - sdk/redis/Azure.ResourceManager.Redis/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/redis/ci.mgmt.yml + - sdk/redis/Azure.ResourceManager.Redis/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/redisenterprise/ci.mgmt.yml b/sdk/redisenterprise/ci.mgmt.yml index 93641cfe3983..294ec0377bdf 100644 --- a/sdk/redisenterprise/ci.mgmt.yml +++ b/sdk/redisenterprise/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/redisenterprise/ci.mgmt.yml - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/redisenterprise/ci.mgmt.yml + - sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/relay/ci.mgmt.yml b/sdk/relay/ci.mgmt.yml index b69a1efbd0f9..fc5a3764ebb5 100644 --- a/sdk/relay/ci.mgmt.yml +++ b/sdk/relay/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/relay/ci.mgmt.yml - sdk/relay/Azure.ResourceManager.Relay/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/relay/ci.mgmt.yml + - sdk/relay/Azure.ResourceManager.Relay/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/reservations/ci.mgmt.yml b/sdk/reservations/ci.mgmt.yml index c46c8c69cd2e..8effbcdd4424 100644 --- a/sdk/reservations/ci.mgmt.yml +++ b/sdk/reservations/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/reservations/ci.mgmt.yml - sdk/reservations/Azure.ResourceManager.Reservations/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/reservations/ci.mgmt.yml + - sdk/reservations/Azure.ResourceManager.Reservations/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/resourceconnector/ci.mgmt.yml b/sdk/resourceconnector/ci.mgmt.yml index 81269b9113c7..149f1805dab4 100644 --- a/sdk/resourceconnector/ci.mgmt.yml +++ b/sdk/resourceconnector/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/resourceconnector/ci.mgmt.yml - sdk/resourceconnector/Azure.ResourceManager.ResourceConnector/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourceconnector/ci.mgmt.yml + - sdk/resourceconnector/Azure.ResourceManager.ResourceConnector/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/resourcegraph/ci.mgmt.yml b/sdk/resourcegraph/ci.mgmt.yml index 5abe050f7709..27656bcd16c2 100644 --- a/sdk/resourcegraph/ci.mgmt.yml +++ b/sdk/resourcegraph/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/resourcegraph/ci.mgmt.yml - sdk/resourcegraph/Azure.ResourceManager.ResourceGraph/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcegraph/ci.mgmt.yml + - sdk/resourcegraph/Azure.ResourceManager.ResourceGraph/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/resourcehealth/ci.mgmt.yml b/sdk/resourcehealth/ci.mgmt.yml index fb0a27171a69..bf3868346c7b 100644 --- a/sdk/resourcehealth/ci.mgmt.yml +++ b/sdk/resourcehealth/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/resourcehealth/ci.mgmt.yml - sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcehealth/ci.mgmt.yml + - sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/resourcemover/ci.mgmt.yml b/sdk/resourcemover/ci.mgmt.yml index 519b8a431926..bbb814c6a4f0 100644 --- a/sdk/resourcemover/ci.mgmt.yml +++ b/sdk/resourcemover/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/resourcemover/ci.mgmt.yml - sdk/resourcemover/Azure.ResourceManager.ResourceMover/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resourcemover/ci.mgmt.yml + - sdk/resourcemover/Azure.ResourceManager.ResourceMover/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/resources/ci.mgmt.yml b/sdk/resources/ci.mgmt.yml index 3fefd5254c85..ff65cb96d07d 100644 --- a/sdk/resources/ci.mgmt.yml +++ b/sdk/resources/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/resources/ci.mgmt.yml - sdk/resources/Azure.ResourceManager.Resources/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/resources/ci.mgmt.yml + - sdk/resources/Azure.ResourceManager.Resources/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/search/ci.mgmt.yml b/sdk/search/ci.mgmt.yml index a8c2a632c1c8..63c0e200644f 100644 --- a/sdk/search/ci.mgmt.yml +++ b/sdk/search/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/search/ci.mgmt.yml - sdk/search/Azure.ResourceManager.Search/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/search/ci.mgmt.yml + - sdk/search/Azure.ResourceManager.Search/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/securitycenter/ci.mgmt.yml b/sdk/securitycenter/ci.mgmt.yml index c728522efab2..6ed8ff4d67a9 100644 --- a/sdk/securitycenter/ci.mgmt.yml +++ b/sdk/securitycenter/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/securitycenter/ci.mgmt.yml - sdk/securitycenter/Azure.ResourceManager.SecurityCenter/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/securitycenter/ci.mgmt.yml + - sdk/securitycenter/Azure.ResourceManager.SecurityCenter/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/securitydevops/ci.mgmt.yml b/sdk/securitydevops/ci.mgmt.yml index c5a54a9ad206..972d98a7376e 100644 --- a/sdk/securitydevops/ci.mgmt.yml +++ b/sdk/securitydevops/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/securitydevops/ci.mgmt.yml - sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/securitydevops/ci.mgmt.yml + - sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/securityinsights/ci.mgmt.yml b/sdk/securityinsights/ci.mgmt.yml index f1d428ebef90..0659cac2858f 100644 --- a/sdk/securityinsights/ci.mgmt.yml +++ b/sdk/securityinsights/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/securityinsights/ci.mgmt.yml - sdk/securityinsights/Azure.ResourceManager.SecurityInsights/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/securityinsights/ci.mgmt.yml + - sdk/securityinsights/Azure.ResourceManager.SecurityInsights/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/selfhelp/ci.mgmt.yml b/sdk/selfhelp/ci.mgmt.yml index bb6a162210eb..ac13ec845ce7 100644 --- a/sdk/selfhelp/ci.mgmt.yml +++ b/sdk/selfhelp/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/selfhelp/ci.mgmt.yml - sdk/selfhelp/Azure.ResourceManager.SelfHelp/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/selfhelp/ci.mgmt.yml + - sdk/selfhelp/Azure.ResourceManager.SelfHelp/ + extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/servicebus/ci.mgmt.yml b/sdk/servicebus/ci.mgmt.yml index 02c45dc88e18..f2ead205ced6 100644 --- a/sdk/servicebus/ci.mgmt.yml +++ b/sdk/servicebus/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/servicebus/ci.mgmt.yml - sdk/servicebus/Azure.ResourceManager.ServiceBus/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/servicebus/ci.mgmt.yml + - sdk/servicebus/Azure.ResourceManager.ServiceBus/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/servicefabric/ci.mgmt.yml b/sdk/servicefabric/ci.mgmt.yml index 430f48c8c87b..afc886a4f7f2 100644 --- a/sdk/servicefabric/ci.mgmt.yml +++ b/sdk/servicefabric/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/servicefabric/ci.mgmt.yml - sdk/servicefabric/Azure.ResourceManager.ServiceFabric/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/servicefabric/ci.mgmt.yml + - sdk/servicefabric/Azure.ResourceManager.ServiceFabric/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/servicefabricmanagedclusters/ci.mgmt.yml b/sdk/servicefabricmanagedclusters/ci.mgmt.yml index e73289f589f4..022ac0f03cd1 100644 --- a/sdk/servicefabricmanagedclusters/ci.mgmt.yml +++ b/sdk/servicefabricmanagedclusters/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/servicefabricmanagedclusters/ci.mgmt.yml - sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/servicefabricmanagedclusters/ci.mgmt.yml + - sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/servicelinker/ci.mgmt.yml b/sdk/servicelinker/ci.mgmt.yml index 77df314e977a..6069e04a3157 100644 --- a/sdk/servicelinker/ci.mgmt.yml +++ b/sdk/servicelinker/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/servicelinker/ci.mgmt.yml - sdk/servicelinker/Azure.ResourceManager.ServiceLinker/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/servicelinker/ci.mgmt.yml + - sdk/servicelinker/Azure.ResourceManager.ServiceLinker/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/servicenetworking/ci.mgmt.yml b/sdk/servicenetworking/ci.mgmt.yml index b2332ae15224..4551f1325475 100644 --- a/sdk/servicenetworking/ci.mgmt.yml +++ b/sdk/servicenetworking/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/servicenetworking/ci.mgmt.yml - sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/servicenetworking/ci.mgmt.yml + - sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/signalr/ci.mgmt.yml b/sdk/signalr/ci.mgmt.yml index c934ed4314fa..f066849c56a1 100644 --- a/sdk/signalr/ci.mgmt.yml +++ b/sdk/signalr/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/signalr/ci.mgmt.yml - sdk/signalr/Azure.ResourceManager.SignalR/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/signalr/ci.mgmt.yml + - sdk/signalr/Azure.ResourceManager.SignalR/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/sphere/ci.mgmt.yml b/sdk/sphere/ci.mgmt.yml index f3f33e9d00f4..749774244735 100644 --- a/sdk/sphere/ci.mgmt.yml +++ b/sdk/sphere/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/sphere/ci.mgmt.yml - sdk/sphere/Azure.ResourceManager.Sphere/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/sphere/ci.mgmt.yml + - sdk/sphere/Azure.ResourceManager.Sphere/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/springappdiscovery/ci.mgmt.yml b/sdk/springappdiscovery/ci.mgmt.yml index 7676386684df..f86c14368089 100644 --- a/sdk/springappdiscovery/ci.mgmt.yml +++ b/sdk/springappdiscovery/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/springappdiscovery/ci.mgmt.yml - sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/springappdiscovery/ci.mgmt.yml + - sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/sqlmanagement/ci.mgmt.yml b/sdk/sqlmanagement/ci.mgmt.yml index da93d03f2d33..8377a2663681 100644 --- a/sdk/sqlmanagement/ci.mgmt.yml +++ b/sdk/sqlmanagement/ci.mgmt.yml @@ -2,6 +2,7 @@ # This file is generated automatically and any changes will be lost. trigger: none + pr: branches: include: @@ -14,6 +15,18 @@ pr: - sdk/sqlmanagement/ci.mgmt.yml - sdk/sqlmanagement/Azure.ResourceManager.Sql/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/sqlmanagement/ci.mgmt.yml + - sdk/sqlmanagement/Azure.ResourceManager.Sql/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/sqlvirtualmachine/ci.mgmt.yml b/sdk/sqlvirtualmachine/ci.mgmt.yml index 28c6192fa86b..049e315855ed 100644 --- a/sdk/sqlvirtualmachine/ci.mgmt.yml +++ b/sdk/sqlvirtualmachine/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/sqlvirtualmachine/ci.mgmt.yml - sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/sqlvirtualmachine/ci.mgmt.yml + - sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/standbypool/ci.mgmt.yml b/sdk/standbypool/ci.mgmt.yml index 0763a516e2c1..54ce1137a123 100644 --- a/sdk/standbypool/ci.mgmt.yml +++ b/sdk/standbypool/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/standbypool/ci.mgmt.yml - sdk/standbypool/Azure.ResourceManager.StandbyPool/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/standbypool/ci.mgmt.yml + - sdk/standbypool/Azure.ResourceManager.StandbyPool/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/storage/ci.mgmt.yml b/sdk/storage/ci.mgmt.yml index 95bc19b325d5..6f05608983be 100644 --- a/sdk/storage/ci.mgmt.yml +++ b/sdk/storage/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/storage/ci.mgmt.yml - sdk/storage/Azure.ResourceManager.Storage/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/storage/ci.mgmt.yml + - sdk/storage/Azure.ResourceManager.Storage/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/storageactions/ci.mgmt.yml b/sdk/storageactions/ci.mgmt.yml index 27062b4565a8..b27838343a2e 100644 --- a/sdk/storageactions/ci.mgmt.yml +++ b/sdk/storageactions/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/storageactions/ci.mgmt.yml - sdk/storageactions/Azure.ResourceManager.StorageActions/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/storageactions/ci.mgmt.yml + - sdk/storageactions/Azure.ResourceManager.StorageActions/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/storagecache/ci.mgmt.yml b/sdk/storagecache/ci.mgmt.yml index c6abf63baf2c..84c922940939 100644 --- a/sdk/storagecache/ci.mgmt.yml +++ b/sdk/storagecache/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/storagecache/ci.mgmt.yml - sdk/storagecache/Azure.ResourceManager.StorageCache/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/storagecache/ci.mgmt.yml + - sdk/storagecache/Azure.ResourceManager.StorageCache/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/storagemover/ci.mgmt.yml b/sdk/storagemover/ci.mgmt.yml index e9055f49e1a9..4e45261a60aa 100644 --- a/sdk/storagemover/ci.mgmt.yml +++ b/sdk/storagemover/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/storagemover/ci.mgmt.yml - sdk/storagemover/Azure.ResourceManager.StorageMover/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/storagemover/ci.mgmt.yml + - sdk/storagemover/Azure.ResourceManager.StorageMover/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/storagepool/ci.mgmt.yml b/sdk/storagepool/ci.mgmt.yml index 2178fc390757..6592a12a262a 100644 --- a/sdk/storagepool/ci.mgmt.yml +++ b/sdk/storagepool/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/storagepool/ci.mgmt.yml - sdk/storagepool/Azure.ResourceManager.StoragePool/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/storagepool/ci.mgmt.yml + - sdk/storagepool/Azure.ResourceManager.StoragePool/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/storagesync/ci.mgmt.yml b/sdk/storagesync/ci.mgmt.yml index a8789947c687..b9fcbb66b30f 100644 --- a/sdk/storagesync/ci.mgmt.yml +++ b/sdk/storagesync/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/storagesync/ci.mgmt.yml - sdk/storagesync/Azure.ResourceManager.StorageSync/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/storagesync/ci.mgmt.yml + - sdk/storagesync/Azure.ResourceManager.StorageSync/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/streamanalytics/ci.mgmt.yml b/sdk/streamanalytics/ci.mgmt.yml index 09d108a1a7d9..860cd851bbd1 100644 --- a/sdk/streamanalytics/ci.mgmt.yml +++ b/sdk/streamanalytics/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/streamanalytics/ci.mgmt.yml - sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/streamanalytics/ci.mgmt.yml + - sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/subscription/ci.mgmt.yml b/sdk/subscription/ci.mgmt.yml index f9067b4c0af3..a00a0e9c56ad 100644 --- a/sdk/subscription/ci.mgmt.yml +++ b/sdk/subscription/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/subscription/ci.mgmt.yml - sdk/subscription/Azure.ResourceManager.Subscription/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/subscription/ci.mgmt.yml + - sdk/subscription/Azure.ResourceManager.Subscription/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/support/ci.mgmt.yml b/sdk/support/ci.mgmt.yml index 5a947c4c4939..d5c857ad8346 100644 --- a/sdk/support/ci.mgmt.yml +++ b/sdk/support/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/support/ci.mgmt.yml - sdk/support/Azure.ResourceManager.Support/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/support/ci.mgmt.yml + - sdk/support/Azure.ResourceManager.Support/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/synapse/ci.mgmt.yml b/sdk/synapse/ci.mgmt.yml index 0a089a504291..18c8132c4803 100644 --- a/sdk/synapse/ci.mgmt.yml +++ b/sdk/synapse/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/synapse/ci.mgmt.yml - sdk/synapse/Azure.ResourceManager.Synapse/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/synapse/ci.mgmt.yml + - sdk/synapse/Azure.ResourceManager.Synapse/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/terraform/ci.mgmt.yml b/sdk/terraform/ci.mgmt.yml index 82c4c1f05a4c..5f7b3d41fb27 100644 --- a/sdk/terraform/ci.mgmt.yml +++ b/sdk/terraform/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/terraform/ci.mgmt.yml - sdk/terraform/Azure.ResourceManager.Terraform/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/terraform/ci.mgmt.yml + - sdk/terraform/Azure.ResourceManager.Terraform/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/trafficmanager/ci.mgmt.yml b/sdk/trafficmanager/ci.mgmt.yml index 528f78b70b96..86b17c08ac4e 100644 --- a/sdk/trafficmanager/ci.mgmt.yml +++ b/sdk/trafficmanager/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/trafficmanager/ci.mgmt.yml - sdk/trafficmanager/Azure.ResourceManager.TrafficManager/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/trafficmanager/ci.mgmt.yml + - sdk/trafficmanager/Azure.ResourceManager.TrafficManager/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/trustedsigning/ci.mgmt.yml b/sdk/trustedsigning/ci.mgmt.yml index 5b67358a4477..07fb171ee416 100644 --- a/sdk/trustedsigning/ci.mgmt.yml +++ b/sdk/trustedsigning/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/trustedsigning/ci.mgmt.yml - sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/trustedsigning/ci.mgmt.yml + - sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/voiceservices/ci.mgmt.yml b/sdk/voiceservices/ci.mgmt.yml index a914d1640296..64ea2eb63c0f 100644 --- a/sdk/voiceservices/ci.mgmt.yml +++ b/sdk/voiceservices/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/voiceservices/ci.mgmt.yml - sdk/voiceservices/Azure.ResourceManager.VoiceServices/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/voiceservices/ci.mgmt.yml + - sdk/voiceservices/Azure.ResourceManager.VoiceServices/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/webpubsub/ci.mgmt.yml b/sdk/webpubsub/ci.mgmt.yml index 6bcb8439a2b0..a312a96feb5a 100644 --- a/sdk/webpubsub/ci.mgmt.yml +++ b/sdk/webpubsub/ci.mgmt.yml @@ -1,5 +1,6 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -12,6 +13,18 @@ pr: - sdk/webpubsub/ci.mgmt.yml - sdk/webpubsub/Azure.ResourceManager.WebPubSub/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/webpubsub/ci.mgmt.yml + - sdk/webpubsub/Azure.ResourceManager.WebPubSub/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/websites/ci.mgmt.yml b/sdk/websites/ci.mgmt.yml index d67c580bc414..4dbf184acc87 100644 --- a/sdk/websites/ci.mgmt.yml +++ b/sdk/websites/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/websites/ci.mgmt.yml - sdk/websites/Azure.ResourceManager.AppService/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/websites/ci.mgmt.yml + - sdk/websites/Azure.ResourceManager.AppService/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/workloadmonitor/ci.mgmt.yml b/sdk/workloadmonitor/ci.mgmt.yml index 7c6a51fbe75c..e834be340ea9 100644 --- a/sdk/workloadmonitor/ci.mgmt.yml +++ b/sdk/workloadmonitor/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/workloadmonitor/ci.mgmt.yml - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/workloadmonitor/ci.mgmt.yml + - sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: diff --git a/sdk/workloads/ci.mgmt.yml b/sdk/workloads/ci.mgmt.yml index e3457d69ceaa..bf3983053473 100644 --- a/sdk/workloads/ci.mgmt.yml +++ b/sdk/workloads/ci.mgmt.yml @@ -1,6 +1,7 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. trigger: none + pr: branches: include: @@ -13,6 +14,18 @@ pr: - sdk/workloads/ci.mgmt.yml - sdk/workloads/Azure.ResourceManager.Workloads/ + + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/workloads/ci.mgmt.yml + - sdk/workloads/Azure.ResourceManager.Workloads/ + extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: